Script Recursion: minimum stack depth for warnings

Features wanted...
Post Reply
jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Script Recursion: minimum stack depth for warnings

Post by jacky »

Okay, so I'm sure conditions & loops are coming in scripting 2.0, but in the mean time I'm already trying to get myself some scripts that do work kinda the same, and if for conditions so far I'm good, I think I may have find something that would work for me for loops as well, but because of the (annoying) warning message I get each time ("The current script appears to be recursive. The stack depth is n.") it kinda defeats the purpose.

And so I was wondering if there could be a little thing, either INI Tweak or (better) script command, so that I could define the value (of stack depth) after which XY should start warning me. In other words, right now it's either 1 or 2, depending on how you look at it, and I'd like to be able to put that number higher, so that my script can call itself as many times as I need it to call itself without the recurring popups ?

Even some "unofficial"/undocumented script command that would temporary (for the current script batch) change that value would be enough, I could even set it exactly as high as it needs to be then.
That'd be really cool :) Thanks.
Proud XYplorer Fanatic

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

Bumping this, cause I have scripts with loops that I use but get an annoying popup each time, or scripts I can't use because of said popups because it'd be too much of a pain, and (unless official loops are in very soon) I'd really like this little thing, whihc could be useful to anyone who's doing such looping/recursing scripts.

And with an "unofficial"/undocumented command to use at our own risk (and which cound even have a max value, as long as it's >50 I'm good ;)), it wouldn't compromise XY's stability...
Proud XYplorer Fanatic

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

Code: Select all

v7.00.0043 - 2008-04-20 13:39 
    + Tweak: Added the possibility to switch off the recursion checker: 
        [Settings] 
        ScriptRecursionWarningOff=1 
Oh nice, this is so cool!! :D I have a few recurvise scripts that will now work without any popup, and I just updated one and now I'm asked for how many times it should run, and it does so, flawlessly, in no time, I love it! :D

Thanks a lot!

PS: "To define recursion, we must first define recursion." hehe... ;) What made me smile about this also, is how it sounded like discussions I've been having about Lost, and paradoxes with time travel. I know no one cares but it made me smile ;)
Proud XYplorer Fanatic

Post Reply