Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Again Help Chapter 2
#2
The best way to do this type of thing is with some type of INPUT VALIDATION loop.   Let me share simple demo for you:


HP = 0
DO
    PRINT " A MONSTER APPEARD"
    PRINT
    PRINT "(1) GERMAN SUPLEX"
     INPUT X
     IF X <> 1 THEN PRINT "ERROR -- INVALID CHOICE"
LOOP UNTIL X = 1
IF X = 1 THEN HP = 0

DO....  LOOP UNTIL.... the input variable is in the proper range to be valid
Reply


Messages In This Thread
Again Help Chapter 2 - by BloodyHash - 05-19-2024, 01:25 PM
RE: Again Help Chapter 2 - by SMcNeill - 05-19-2024, 01:36 PM
RE: Again Help Chapter 2 - by BloodyHash - 05-19-2024, 01:47 PM
RE: Again Help Chapter 2 - by Dimster - 05-19-2024, 02:32 PM



Users browsing this thread: 1 Guest(s)