Hi, I have loop detection set to [TRUE] in my command script. From this scrip I call another script which has to return a value.
I run the main script and get the following error in my log.
MESSAGE FROM SCRIPT ENGINE
Infinate loop detected, script terminated.
howie.shipcargo.check:16:1:0:82383405:0 while $SubType $TempSubTypes
Refobj:{ship script run from}, env {sector ship in}.
If I run this script using (r) and choose the ship to run it on, it works fine & returns the correct value.
Firstly, what do all of the numbers mean and secondly, if this script works independantly, why doesn't it work in a nested environment?
Thanks for your help.
Loop Detection scripting help please
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 103
- Joined: Wed, 6. Nov 02, 20:31
Loop Detection scripting help please
One must die to self to live for self.
-
- Posts: 5230
- Joined: Wed, 6. Nov 02, 20:31
Been going loopy my self. 
BTW im not using loop detection.
I have had mixed success with loops. My own problem is trying to get a script called from a loop to send a value back to the loop to determine when it has finished running. The idea is for the script to run one mission at a time and wait for one to complete before running another one.
At the moment I either get the same script run 15 times in a second, run once and crash or just crash.
There are some definate oddities about X2 script that need explaining better I think. Still I am slowely sussing out all the little qerks of the game.
Giskard

BTW im not using loop detection.
I have had mixed success with loops. My own problem is trying to get a script called from a loop to send a value back to the loop to determine when it has finished running. The idea is for the script to run one mission at a time and wait for one to complete before running another one.
At the moment I either get the same script run 15 times in a second, run once and crash or just crash.

There are some definate oddities about X2 script that need explaining better I think. Still I am slowely sussing out all the little qerks of the game.
Giskard
This signature has been stolen by the well known Teladi Signature Thief X Siggy.