Home   Help Search Login Register  

Author Topic: Script Execution Internals ...  (Read 514 times)

0 Members and 2 Guests are viewing this topic.

Kinnon

  • Guest
Script Execution Internals ...
« 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 :(

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:Script Execution Internals ...
« Reply #1 on: 15 Apr 2003, 16:57:09 »
Initialze the enemy var at the top of the script,
ie.
enemy = obj/string/array or whatever

Ben

Kinnon

  • Guest
Re:Script Execution Internals ...
« Reply #2 on: 16 Apr 2003, 18:39:01 »
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 ...