Project Tokens Scripting
rocfusion:
Hi,
When you are using project tokens in your scripts. Be careful to watch for invalid tokens.
To account for this you could use something like this, it would be placed in the init part of your script.
if(IR.GetVariable("Global.MyToken")==undefined || IR.GetVariable("Global.MyToken")==NaN || IR.GetVariable("Global.MyToken")==null) { IR.SetVariable("Global.MyToken",0) }
Here if MyToken is not valid it will reset to the value of 0.
Thanks,
Roger
Customer support service by UserEcho