Whenever I press F12, I get this error:
Script 'Tons 2' line 1248: SystemStackError occured.
stack level too deep
I'm pretty sure that Zeriab made a fix for this before, but all the links I found linking to it were broken. I just want F12 to do what it normally does, to return me to the title screen at any time whenever I press it.
(Also, at the moment I'm using Dubealex's AMS, then below it are the three Tons scripts, and then below that are the three Blizz-ABS scripts.)
EDIT: Woops wrong one hang on sorry
EDIT 2: Found this I think this'll fix that
#=begin
unless $f12_cleaner_F3XXEFA1.nil?
# Opens the game executable in a new thread
Thread.new{system ("Game")} # "Game" = Name of the game executable
# Exits this thread
exit
end
# Modifying this global variable might cause this snippet to stop working properly.
# Some garbage have been added to lessen the chance of it already being used
$f12_cleaner_F3XXEFA1 = true
#=end
#==============================================================================
# F12 fix
#==============================================================================
if $game_exists
Thread.new {system('Game')}
exit
end
$game_exists = true
I think that will work a little better that the one game guy posted
Yeah, Ryex, yours worked a little better, just one thing: Now, when I hit F12, it closes the window and then opens up a new one (with the title screen up) (however, the window doesn't pop straight up, it appears in the taskbar first). I think it's supposed to do that, but is there any work-around to this? It's kind of annoying having to go and click on the new window down in my taskbar.
Also, it doesn't work very well in fullscreen mode, either (as it exits and then opens up the new, normal-sized window).
So, what I'm saying is: Is this possible to do without closing any windows in the process?
Quote from: Takua on October 04, 2009, 01:30:12 pm
Yeah, Ryex, yours worked a little better, just one thing: Now, when I hit F12, it closes the window and then opens up a new one (with the title screen up) (however, the window doesn't pop straight up, it appears in the taskbar first). I think it's supposed to do that, but is there any work-around to this? It's kind of annoying having to go and click on the new window down in my taskbar.
Also, it doesn't work very well in fullscreen mode, either (as it exits and then opens up the new, normal-sized window).
So, what I'm saying is: Is this possible to do without closing any windows in the process?
Yep. First, put these lines around each piece of Tons:
unless $TONS_IS_ALREADY_LOADED
and
And then, immediately after the rest of tons, add this:
$TONS_IS_ALREADY_LOADED = true
ya use long fellow's method instead of mine if you don't like the new window thing
Thanks Longfellow, you gave me exactly what I needed. :)