Uprisen noted to me a few broken ladders in the game. When pressing OK at the top/bottom of ladders it is possible to lock the game - or crash it entirely.
Here's why:
When you get onto a ladder the first time, generally the code is safe. A line activation leads to a script.
And the script is "Only if script not already running" - so mashing the OK button will have no effect.
But the problem lies where you enter a screen already on a ladder. Here, the script programmers made a mistake. They didn't factor in that the script version with "Only if script not already running" is no longer being used, as they elected to use MAIN of the character instead. This means that the script version hasn't yet run and can be activated at the same time as the MAIN version is active, leading to hangs and crashes.
How to fix is very simple:
Let's take sbw4_3, which has 2 ladders that will both crash the game.
Under LINE 1 I have added a check for [5][255] flag
If key [OK|CIRCLE] or [???] pressed once (else goto label 1)
If Var[5][255] == 0 (else goto label 1)
Execute script #4 in extern group cloud (No4) (priority 6/6) - Only if the script is not already running
Label 1
Only if 255 is 0 will the grab ladder code be accepted.
And in the MAIN of Cloud, at the top
Var[5][255] = 1 (8 bit)
and the bottom
Var[5][255] = 0 (8 bit)
This ensures that MAIN will be fully complete before allowing the ladder code. So there will never be a simultaneous call while on a ladder.
I have added this to LINE 2 as well, as both ladders on this field are broken.
If key [OK|CIRCLE] or [???] pressed once (else goto label 1)
If Var[5][255] == 0 (else goto label 1)
Execute script #5 in extern group cloud (No4) (priority 6/6) - Only if the script is not already running
Label 1
Uprisen has noted various others that I've fixed for The Reunion.
rktbas2, las0_2 among them. So, if you know of any more, let me know.