Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

[Beta 18] Crash after editing and recompiling scripts?

4 replies · 1,129 views · Started 23 February 2011

I started with this quest: carryovertest.qst. After a small script edit and recompile, ZC started crashing when hitting the transistion to the northern screen, where the FFC is.

If it helps, here is the edited quest: carryovertestfail.qst

Allegro.log contains this line at the very end:

Stack over or underflow, stack pointer = 0

Oh, and the weird part is now I am getting the crash with both versions of the test quest.

This is bizarre. It looks like writing to Game variables in the global script is causing it to pop too much?
Looks like commenting out Game->Cheat = 4; in the global script should fix it. I don't know why that would be, though...

Commenting out that line appears to stop the crashing for me too.

Here's another oddity: if I load that quest immediately upon starting ZC, I get the crash, but if I load a different quest first and then that one, ZC doesn't crash (at least not so far).

EDIT: I think having the global slot 2 script quit has something to do with this. I set it up to loop after setting Game->Cheat (with just a Waitframe() call inside the loop) and ZC didn't crash.

Yep, that was it. It wasn't checking whether the global script had terminated before running it while scrolling.