ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Paulonius on November 12, 2009, 05:55:21 PM
-
I am working on a script that runs a series of acts based on a string of data input. I am thinking that I want to put in a conditional to break out of the sub when the variable comes back empty. I am not sure what value I should put in to represent a variable with no assigned value, but I think I have seen people use -1 for this. Would this work to to jump out of my sub when it hits an unassigned variable?
If %Variable = -1
Return
-
You will need a loop of some type to hold you in the process. Here is an example but is not the gospel.
Sub Continue
repeat
do alot of stuff here
until %variable = -1
return
I can help alot more if you can give me some code to work with though or pass me the code you are trying to figure out and I will step you into it.
-
I built a ladder and the script drops down it one step at a time executing a series of subs. I wanted to the use the conditional to check each time after the first to decide whether to take the next step, or return.
If -1 is the value I can use to check, then that is what I needed.
Thanks M!!!