I know I must be doing something stupid here. I made a larger program, but it's mostly just a text adventure type thing with a lot of drawtext lines. I simplified it a bit but the rest of the code is the same.
Notice how I used the flashy color code for "You Win!" from one of the beginner tutorials. Isn't that just adorable?
Anyways the compile error I get is "'Until' without matching 'Repeat'", but there are just as many repeats to match all the untils I am using. What gives?
SetGraphicsDriver GLMax2DDriver() AppTitle = "More like TEST adventure" Graphics 400,300,0,60 Local font:TImageFont=LoadImageFont("C:\WINDOWS\Fonts\arial.ttf",16) SetImageFont(font) SeedRnd MilliSecs() Repeat Cls DrawText "How do you respond?", 100, 140 DrawText "(Y = ~qYes!~q / N = ~qNo!~q)", 100, 160 Flip Repeat Until KeyDown(KEY_Y) Or KeyDown(KEY_N) If KeyDown(KEY_N) Then Repeat Cls blinkR = Rnd(255) blinkG = Rnd(255) blinkB = Rnd(255) DrawText "YOU WIN!", 100, 140 SetColor blinkR,blinkG,blinkB DrawText "Play Again?", 90, 180 Flip Until KeyDown(KEY_Y) Or KeyDown(KEY_N) Else Repeat Cls DrawText "YOU LOSE!" 100, 140 DrawText "Play Again? (Y)es/(E)xit" 70, 180 Flip Until KeyDown(KEY_Y) Or KeyDown(KEY_E) If KeyDown(KEY_Y) Then Exit Until KeyDown(KEY_E) End
Notice how I used the flashy color code for "You Win!" from one of the beginner tutorials. Isn't that just adorable?
Anyways the compile error I get is "'Until' without matching 'Repeat'", but there are just as many repeats to match all the untils I am using. What gives?