Beyond that, below is an indented version of your code. Notice that indented code will add a space/tab/"|" when a command (Then/For(/While /Repeat ) is used that would require an End command. Also it decreases the indent when you use an End command. Code that has the proper amount of End commands, won't have an indent at the end of the code.
The only reason why "While 1" wouldn't loop is for two reasons: (1) there isn't an appropriate End command for it, so it would reach the end of the program before it loops, or (2) there's a "Return " command that's preventing the code from going through the entire loop. Your code isn't working as expected for the former reason.
Here's your code as indented so you have a more visual way to look at the code:
Code:
::ClrDraw
:Text(0,25,"BATTLE!
:Text(15,25,Str3
:Text(25,25,"1. FIGHT
:Text(35,25,"2. HIDE
:While 1
:¦ getKey→E
:¦ If E=93:Then
:¦ ¦ randInt(1,20→R
:¦ ¦ If R≤L3(10:Then
:¦ ¦ ¦ Text(45,25,"ESCAPED!
:¦ ¦ ¦ Pause :ClrDraw:Return:End
:¦ ¦ If R>L3(10:Then
:¦ ¦ ¦ Text(45,25,"CAN'T ESCAPE!
:¦ ¦ ¦ Pause
:¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ 92→E:End:End
:¦ If E=92:Then
:¦ ¦ Lbl 1
:¦ ¦ Text(0,25,"CHOOSE WEAPON
:¦ ¦ Text(25,25,"1. HUMAN
:¦ ¦ Text(35,25,"2. COVENANT
:¦ ¦ 0→E
:¦ ¦ While 1
:¦ ¦ ¦ getKey→E
:¦ ¦ ¦ If E=92:Then
:¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ Text(0,25,"CHOOSE WEAPON
:¦ ¦ ¦ ¦ Text(15,5,"1. MAGNUM ",L2(6),"/",L2(7
:¦ ¦ ¦ ¦ Text(25,5,"2. ASSAULT RIFLE ",L2(8),"/",L2(9
:¦ ¦ ¦ ¦ Text(35,5,"3. SHOTGUN ",L2(16),"/",L2(17
:¦ ¦ ¦ ¦ Text(45,5,"4. SNIPER RIFLE ",L2(18),"/",L2(19
:¦ ¦ ¦ ¦ Text(55,5,"5. FRAG GRENADE ",L2(
:¦ ¦ ¦ ¦ Text(55,72,"6. BACK
:¦ ¦ ¦ ¦
:¦ ¦ ¦ ¦ 0→F
:¦ ¦ ¦ ¦ While 1
:¦ ¦ ¦ ¦ ¦ getKey→F
:¦ ¦ ¦ ¦ ¦ If F=92:Then
:¦ ¦ ¦ ¦ ¦ ¦ L1(1→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ L1(2→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ L2(6)-L1(3→L2(6
:¦ ¦ ¦ ¦ ¦ ¦ L2(6→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ L2(7→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ "MAGNUM→Str1:End
:¦ ¦ ¦ ¦ ¦ If F=93:Then
:¦ ¦ ¦ ¦ ¦ ¦ L1(4→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ L1(5→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ L2(8)-L1(6→L2(8
:¦ ¦ ¦ ¦ ¦ ¦ L2(8→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ L2(9→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ "ASSAULT RIFLE→Str1:End
:¦ ¦ ¦ ¦ ¦ If F=94:Then
:¦ ¦ ¦ ¦ ¦ ¦ L1(16→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ L1(17→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ L2(16)-L1(18→L2(16
:¦ ¦ ¦ ¦ ¦ ¦ L2(16→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ L2(17→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ "SHOTGUN→Str1:End
:¦ ¦ ¦ ¦ ¦ If F=82:Then
:¦ ¦ ¦ ¦ ¦ ¦ L1(19→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ L1(20→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ L2(18)-L1(21→L2(18
:¦ ¦ ¦ ¦ ¦ ¦ L2(18→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ L2(19→L2(51
:¦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¦ ¦ L2(24→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(25→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ ¦ "PLASMA PISTOL→Str1:End
:¦ ¦ ¦ ¦ ¦ ¦ If F=93:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(31→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(32→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(26)-L1(33→L2(26
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(26→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(27→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ ¦ "PLASMA RIFLE→Str1:End
:¦ ¦ ¦ ¦ ¦ ¦ If F=94:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(34→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(35→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(28)-L1(36→L2(28
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(28→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(29→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ ¦ "NEEDLER→Str1:End
:¦ ¦ ¦ ¦ ¦ ¦ If F=82:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(49→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(50→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(38)-L1(51→L2(38
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(38→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(39→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ ¦ "ENERGY SWORD→Str1:End
:¦ ¦ ¦ ¦ ¦ ¦ If F=83:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(55→L2(48
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L1(56→L2(49
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(4)-L1(57→L2(4
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(4→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ ¦ 4→L2(51
:¦ ¦ ¦ ¦ ¦ ¦ ¦ "PLASMA GRENADE→Str1:End
:¦ ¦ ¦ ¦ ¦ ¦
:¦ ¦ ¦ ¦ ¦ ¦ If F=84:Goto 1
:¦ ¦ ¦ ¦ ¦
:¦ ¦ ¦ ¦ ¦ End
:¦ ¦ ¦ ¦ ¦
:¦ ¦ ¦ ¦ ¦ randInt(1,100→θ
:¦ ¦ ¦ ¦ ¦ If θ≤L2(49:Then
:¦ ¦ ¦ ¦ ¦ ¦ L3(2)-L2(48→L3(2
:¦ ¦ ¦ ¦ ¦ ¦ If L3(2≤0:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L3(1)+L3(2→L3(1
:¦ ¦ ¦ ¦ ¦ ¦ ¦ 0→L3(2
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ ¦ ¦ ¦ Text(15,25,Str3," HAS NO SHIELDS!
:¦ ¦ ¦ ¦ ¦ ¦ ¦ Pause
:¦ ¦ ¦ ¦ ¦ ¦ End
:¦ ¦ ¦ ¦ ¦ ¦ If L3(1≤0:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ ¦ ¦ ¦ Text(35,25,Str2," KILLED ",Str3
:¦ ¦ ¦ ¦ ¦ ¦ ¦ randInt(1,20→θ
:¦ ¦ ¦ ¦ ¦ ¦ ¦ If θ≤L3(6:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Text(45,25,Str3," DROPPED WEAPON
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Pause
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ randInt(L3(7),L3(8)→θ
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ If θ>L2(50
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ θ→L2(50
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ If L2(50>L2(51
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(51→L2(50:End
:¦ ¦ ¦ ¦ ¦ ¦ End:Return:End
:¦ ¦ ¦ ¦ ¦ If θ>L2(49:Then
:¦ ¦ ¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ ¦ ¦ Text(35,25,Str2," MISSED!
:¦ ¦ ¦ ¦ ¦ ¦ Pause
:¦ ¦ ¦ ¦ ¦ ¦
:¦ ¦ ¦ ¦ ¦ ¦ randInt(1,100→θ
:¦ ¦ ¦ ¦ ¦ ¦ If θ≤L3(4:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(2)-L3(5→L2(2
:¦ ¦ ¦ ¦ ¦ ¦ ¦ If L2(2≤0:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ L2(1)+L2(2→L2(1
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Text(15,25,Str2," HAS NO SHIELDS!
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Pause
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ If L2(1≤0:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Text(35,25,Str2," DIED!
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Pause
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ prgmHALODELV
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Stop
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ End:End:End
:¦ ¦ ¦ ¦ ¦ ¦ If θ>L3(4:Then
:¦ ¦ ¦ ¦ ¦ ¦ ¦ ClrDraw
:¦ ¦ ¦ ¦ ¦ ¦ ¦ Text(35,25,Str3," MISSED!
:¦ ¦ ¦ ¦ ¦ ¦ ¦ Pause:End
:¦ ¦ ¦ ¦ ¦
:¦ ¦ ¦ ¦ ¦ End
Notice that you're missing about 5 End commands.
Usually what I do to prevent this from happening is when I code on the calc, I'll immediately add and End command for it, then insert lines, and work on those inserted lines. This way I never worry about having the appropriate number of End's.
Another thing I'll usually do to prevent this is code on paper or on the computer, and indent as I go.