I'd like to tell the user to input a digit from 1-9 (inclusive). The program is meant to repeat until the user has input a number from within that restrictions. However, the application will reject the input and not be recorded if the user gives an invalid input such as special characters or digits above 9 or below 0.
Unfortunately, it doesnt seem to work.......here is the code below....can someone help me out? thank you!
http://imgur.com/HmLVLhD
Offline
I don't think you need the "If answer if a number" factor.
Offline
I think that should work.setvalid? ▼tofalserepeat untilvalid?=trueaskInteger 1-9?and waitifnotandanswer=0=answer+10This checks if it's a number or not.iforanswer>1answer=1iforanswer<9answer=9if=answermod10setvalid? ▼totrue
Last edited by mathfreak231 (2013-04-28 10:47:32)
Offline