pold500 / gens-rerecording

Automatically exported from code.google.com/p/gens-rerecording
0 stars 0 forks source link

Long Lua Script no longer freezes Gens; pop-up box unneccesary. #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Just as stated - The pop-up box only halts long scripts now - they can be
stopped at any time by the user. 

The pop-up box is now just an annoyance. 

Thanks to nitsuja for fixing the freeze issue. 

Original issue reported on code.google.com by kylethom...@gmail.com on 7 Feb 2009 at 9:52

GoogleCodeExporter commented 8 years ago
OK, as of revision 209 I replaced the pop-up box with a more subtle indicator 
that
the script has frozen. The window title says "<BUSY>" and the output box gives 
the
file/line number where it froze. Your scripts should almost never do that if 
they're
written properly, but if you really don't care then this should be less 
intrusive.

Original comment by nitsuja-@hotmail.com on 8 Feb 2009 at 5:22

GoogleCodeExporter commented 8 years ago
I enjoy the change, but I disagree with the idea that Lua should 'never' 
display this
behaviour. 

Here is an example script that causes script busy messages every execution.

while (gens.lagged()) do
   gens.emulateframeinvisible()
end;

This occurs in Shining in the Darkness - the majority of frames in a battle are 
'lag
frames.'

Thus, this is a quick script to figure out what happens after a battle.

While it isn't a big deal - any bots that take use of a while loop and
gens.emulateframeinvisible will spam that message. 

To reproduce - 
load SitD. 
Pause
load that save state
Execute the script
unpause. 
Watch the spamming :)

Original comment by kylethom...@gmail.com on 22 Mar 2009 at 10:58

Attachments:

GoogleCodeExporter commented 8 years ago
If you don't want it to do that then the bot should call gens.wait() every few 
times
through the loop or something. That's the intended thing the script should have 
to do
in situations like this. (Are you saying the message itself should be disabled?)

Original comment by nitsuja-@hotmail.com on 23 Mar 2009 at 5:05

GoogleCodeExporter commented 8 years ago
Well, I'm going to assume the answer is "yes" and simply disable the message.
(revision 262)

Hopefully the script window title saying <BUSY> is enough of a clue on its own.

Original comment by nitsuja-@hotmail.com on 30 Mar 2009 at 6:08