This is my sub-program:
:If M=1:Then
:If F:Then
:DelVar [F]DelVar[I]
:{8,16→dim([F]
:[F]→[I]
:
:24→L:25→U:26→R:34→D:0→F:1→T:0→O:0→P:1→S:0→W:2→I:2→J
:
:For(X,2,15
:1→[F](1,X
:2→[I](1,X
:End
:
:For(X,2,14
:1→[F](3,X
:2→[I](3,X
:End
:
:For(X,3,14
:1→[F](5,X
:2→[I](5,X
:End
:
:For(X,2,15
:1→[F](8,X
:2→[I](8,X
:End
:
:For(Y,1,8
:1→[F](Y,1
:1→[I](Y,1
:End
:
:For(Y,1,8
:1→[F](Y,16
:1→[I](Y,16
:End
:
:For(X,6,14,4
:1→[F](6,X
:1→[I](6,X
:End
:
:For(X,4,12,4
:1→[F](7,X
:1→[I](7,X
:End
:
:2→[F](2,2
:1→[F](4,14
:2→[F](7,2
:3→[F](4,13
:5→[I](4,13
:2→[F](2,10
:1→[I](6,2
:1→[I](4,14
:
:For(X,2,14,4
:3→[I](5,X
:End
:
:For(X,4,16,4
:3→[I](8,X
:End
:
:For(Y,1,5,2
:3→[I](Y,1
:End
:
:3→[I](8,1
:3→[I](3,14
:3→[I](1,16
:
:Else
:Pause "ELSE
:If I=2 and J=2:Then
:“ YOU ARE ‘I’ AND YOU MOVE LEFT, RIGHT, UP, AND DOWN BY USING THE DIRECTIONAL ARROW KEYS. (PRESS ‘ENTER’ OR ‘2ND’ TO STOP READING)→Str1:1→W:0→[F](2,2
:End
:Pause “2ND IF AFTER ELS
:If I=10 and J=2:Then
:“CAN YOU SEE THE + OVER THERE? THAT MARKS THE TREASURE!!! →Str1:1→W:0→[F](2,10
:End
:
:If I=2 and J=7:Then
:“NOT EVERYTHING IS AS IT SEEMS...→Str1:1→W:0→[F](7,2
:End
:
:End:End
:
:If max(M={2,3,4,5,6,7,8,9,10:Then
:“SORRY, THIS MAP DOES NOT EXIST YET→Str1
:24→L:25→U:26→R:34→D:1→F:0→T:0→O:0→P:0→S:2→W:1→I:1→J
:End
:
:Return
This code is designed to set up a map if it is the first time it is run (i.e. If F=1, where F = First Time), or, if it is not the first time run (F=0) then it has returned to do some special code (S=1). The "M" variable is the map number, so if M=1 and F=1, then the program sets up Map 1. If M=1 and F=0, then the program does the special code.
That's all fine, but when I run the subprogram (variables are as follows: M=1, F=0, I=10, J=2) I get the Pause message "ELSE but then when I press ENTER, it doesn't even reach the second Pause “2ND IF AFTER ELS" and the program simply closes.
Why oh why does the second message not appear? I have checked to End all Ifs in the right places, but I must be doing something wrong…but WHAT?
I realise I am being a noob right now asking others to solve my problems, but please don't hold that against me…this is a very confronting experience for me and I feel pathetic not being able to solve the problem myself. Please help me, some body!
Cheers ~ James Kanjo