the points about ELSE IF and the SCREEN optison are totally separate - please do not confuse that there is any issue of having screen functions inside the IF statement (if everything is openned correctly)
The point being made is, that .. the AMOS Editor automaticalyl opens a default screen when you run it. Compiled code may not, unless you set the option to.
E.g the following should work in the Editor as a lone programme:
PRINT "hello"
This will print the word 'hello' to screen 0.
however, the compiled version may not work, and must include code to open the screen....
SCREEN OPEN 0,320,256,16,Lowres
PRINT "hello"
Perhaps the NTSC/PAL check requires one screen to already be open to test? If so, you can try something like this....
SCREEN OPEN 0,320,256,16,Lowres
SCREEN HIDE 0
IF NTSC = TRUE
SCREEN OPEN 1,320,200,16,Lowres
ELSE
SCREEN OPEN 1,320,256,16,Lowres
ENDIF
SCREEN CLOSE 0
On a totally separate matter, the problem with ELSE IF is not a problem of too many IF statments, so do not worry about your over all program size.
The following is absolutely fine:
IF A=0
DO SOMETHING
ENDIF
IF A=1
DO SOMETHING ELSE
ENDIF
IF A=2
DO SOMETHING ELSE
ENDIF
...
and this can continue forever without problem.
The issue arises when you have one IF statement, and too many ELSE IF statements with it. I cannot remember what the limit is. (30-40?)
so for example, although you could continue like this for a long time in the Editor, the compiled program may throw up a problem ...
IF A=0
DO SOMETHING
ELSEIF A=1
DO SOMETHING ELSE
ELSEIF A=2
DO SOMETHING ELSE
..
.. (more ELSE IF statmentsto go here)
..
ELSEIF A=64
DO SOMETHING ELSE
ENDIF
your best bet is still to debug the code and try and find the actual code that fails. without it, this is all speculation as to where the problem might be.
Another thought is that you have changed the AMOS interpretter settings, say to allow for a higher number of BOBS, but are compiling on a disk copy where the limit is set lower. On this basis, i would always recommend launching the editor from within the editor menu, to ensure consistancy of extensions, interpretter settings etc.