Home   Help Search Login Register  

Author Topic: problem with call compile (solved)  (Read 1019 times)

0 Members and 1 Guest are viewing this topic.

Offline trooper.ryan

  • Members
  • *
problem with call compile (solved)
« on: 02 Mar 2008, 03:34:56 »
I have a loop to cycle through a number of variables, BomberTarget0, BomberTarget1, BomberTarget2 etc

I want to get the value of each of these variables, but the hint shows _foo as something like: "scalar bool array 00ffex".

Any suggestion would be appreciated.

Code: [Select]
for [{_c = 0},{_c < 10},{_c = _c + 1}] do {
call compile format["_foo = BOMBERTarget%1", _c];
hint format["BomberTarget%1: %2", _c, _foo];
        sleep 1;
};


EDIT: After too many hours I found a solution myself.
Code: [Select]
for [{_c = 0},{_c < 10},{_c = _c + 1}] do {
_foo = call compile format["BomberTarget%1", _c];
hint format["BomberTarget%1: %2", _c, _foo];
        sleep 1;
};
« Last Edit: 02 Mar 2008, 04:15:19 by trooper.ryan »