Home   Help Search Login Register  

Author Topic: Randomizing the location of an object from predefined locations  (Read 3719 times)

0 Members and 1 Guest are viewing this topic.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
It decided to not work because it claims there is a missing semi-colon.

obj1_1.sqf:
Code: [Select]
if not isServer then exitWith {};

_crateList = [AA1,AA2,AA3,AA4,AA5,AA6];

// select two random crates and remove the others from the list...

_rnd = floor(random(count _crateList));
_crate = _crateList select _rnd;
_crateList = _crateList - [_crate];

_rnd = floor(random(count _crateList));
_crate = _crateList select _rnd;
_crateList = _crateList - [_crate];


// ...and delete the rest
{ deleteVehicle _x } forEach _crateList;

error msg:
Code: [Select]
if not isServer then exitWith {};

_crateList = [AA1,AA2,AA3,AA4,AA5,A>
  Error position: <{};

_crateList = [AA1,AA2,AA3,AA4,AA5,A>
  Error Missing ;
« Last Edit: 03 Mar 2009, 05:50:26 by Ironman »
TS3 IP: tor.zebgames.com:9992

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Oops... where did this "then" came" from?  :whistle:

Code: [Select]
if not isServer exitWith {};
try { return true; } finally { return false; }