Here is my code.
on mouseUp
ask "Enter the Question # you would like to go to! Then press the OK button"
if it is not a number or it > 200 or it = 0
then answer "Your input must be a number and must be between 1 and 200!"
else go to card it
end mouseUp
Butttttttt when a person hits the cancel button there is displayed "Your input must be a number and must be between 1 and 200!"
What am I doing wrong and is there a better code?
Thanks!
Stu
Having a problem with the "ask" dialog
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Stu,
It should be:
Best,
Mark
It should be:
Code: Select all
on mouseUp
ask "Enter the Question # you would like to go to! Then press the OK button"
if it is empty then
exit mouseUp
else if it is not a number or it > 200 or it = 0 then
answer "Your input must be a number and must be between 1 and 200!"
else go to card it
end mouseUp
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode