OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kinnon on 15 Apr 2003, 00:04:50
-
lo :)
I'm having a strange problem occuring seemingly randomly at different times in different scripts in a multi-script thing im doing.
All it is is that a local variable in a script is fine in one ine of code, then two lines later it's contents are corrupted.
It doesn't happen all the time, the results can be different over a number of runs without me changing anything, heres just 3 lines of example code ..
_enemy = gwEnemy select _i
_id = TypeOf _enemy
hint format ["%1",_enemy]
and the contents of enemy are corrupted, even though it worked in the TypeOf line ???
I KNOW NOTHING OF SCRIPTING INTERNALS !
plz help :(
-
Initialze the enemy var at the top of the script,
ie.
enemy = obj/string/array or whatever
Ben
-
Thx for that , Ben. But it turns out, because my var was fetched from a list that was generated by a trigger, i just had to wait longer after deactivating the trigger ...