GOTO just uses 1 value, the command index to GO TO, the rest 2 should be ignored, they make no sense. Sometimes it points to 0A (10) (just rough example) when there is only 6 commands in script. And if i look the values, they really do not even look like something from the script.
They are probably left over from something.
But still, one should make some more complex test script with some WHILE commands and zero out the unknown values. And see if it changes the behaviour or crashes the game. The scripts i have so far tested (very simple ones) do not crash it.
But i repeat more testing should be done. On the other side if i look the values, they are not used at all. Go figure.
DO WHILE_TRUE is also implemented now. I was surprised it was so easy. (Actually copy paste of some existing code). Even the nested ones. Tested few variants of scripts, did a hex compare between miss2 and my compiler generated .scr files and they seem to be fine.
Only difference are these unknown values.
Now only the IF ELSE ENDIF left.
The Sektor bossman script seems interesting enough, with all good commands i need now: including WHILE and IF_THEN
http://gtamp.com/forum/viewtopic.php?p=1620#p1620
Will make it compile after i implement IF THEN endif
EDIT
Someone here wrote that ELSE doesnt work very well or doesnt work at all.
What exactly doesnt work?
I did simplest script with while_exec loop. One counter with specific value.
Put in a "if else endif" checking for if counter value is equal to something, if yes then: display_brief(xx)
else display_brief(xxx).
It worked when i executed GTA2. I modified the variable value, recompiled and it shows me different brief after else.
So whats not working? Nested IF_ELSE_ENDIF maybe??