Page 1 of 1

Help me! My script is going a never ending loop!!!

Posted: Tue Oct 14, 2008 8:30 pm
by ale870
Please help me!
I made a wrong code, in fact I started to send a message entering in the stack, then this event call the same recursive function!!

Look at an example here:

Code: Select all

on openStack
  send myMessage
end

on myMessage
  send myMessage
end
Now I have a BIG problem: as soon as I try to modify the code (load the stack) it execute OpenStack and loops forever. So Revolution hangs up!

Please help me!
What can I do to lock the event so I can update it?

Thank you :cry:

Posted: Tue Oct 14, 2008 9:07 pm
by bn
Hi Ale870,

start revolution without the problematic stack.
make a new stack with a button. the script of the button is:

Code: Select all

on mouseUp pMouseBtnNo
    answer file "the recursion file"
    if it is empty then exit mouseUp
    lock messages 
    go stack it
end mouseUp
this opens your recursive stack without the openstack message and you can edit your script.
hth
Bernd

dont forget: recurse and the world curses with you :)

Posted: Tue Oct 14, 2008 9:11 pm
by ale870
Thank you!
You saved my life! :D