OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: trooper.ryan on 02 Mar 2008, 03:34:56

Title: problem with call compile (solved)
Post by: trooper.ryan 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;
};