SRL Archive - OSR Help

Using internal comands (Exit and Break)


Zeta Matt

2012-05-24 15:28:36

When I use exit, how do I know what is the next function it will run? How do I make the script repeat everything from a certain point if it doesnt work ( For example: My script cuts tree then cuts ivy then do antiRandoms; It fails when cutting ivy and I want it to restart the script, going back to cutting trees so it wont fail again at ivy )?

litoris

2012-05-24 15:36:08

Make your ivy cutting function result in a boolean, then you can say
repeat
CutTree;
If (not (CutIvy)) then
Exit
else
AntiRandoms;
until(InvFull)
Or something along those lines.
Using functions instead of procedures will let you change stuff in case an action fails.