How to I make a error code in my texted based game e.g.
which one will you buy
1 rayman
2 metroid prime
I want it so if they enter a number not listed here it will print
"Error not a command"
heres my game code
`music
my:
load music "hey.wma",1
loop music 1
`the instrections
cls
hide mouse
print "how to play"
print "this is a text based game to choose the answers 1 for yes 2 for no"
print "after you choose an answer"
print "press enter after that read the text"
print "when you done press any key"
print "if you lose you will start the game over again"
print "NOTE:later in the game you will get more options to choose"
print "Important:To Exit the game press Esc any time in the game"
suspend for key
`the program
`the go to command
`go to command hold
hi:
play music 1
cls
print "you are a boy named alex you are the cheater in high school"
print "you mission is to cheat your way through high school"
suspend for key
cls
print "monday 8:00 am"
suspend for key
cls
print "as soon as you walk in the class room you see the answers"
print "on the table heres you chance to swipe them so what will you do will you"
print "will you steal them?"
print "1/2"
input choice
if choice = 1
print "you swipe the test answers off the teachers desk"
suspend for key
else
print "bad choice"
print "4 months later"
print "you failed high school you now have to go to usa"
print "to train as a soldier"
suspend for key
goto hi
endif
cls
Print "TEST TIME"
suspend for key
cls
print "the test is starting now you finish the test first"
suspend for key
cls
print "teacher:aaaaaaaaaagggggg OMFG"
print "alright very funny someone stole the tests whoever stole the tests hand"
print "them back or I'll shoot you"
suspend for key
cls
print "you have a choice of handing them back will you do it?"
print "1/2"
input choice
if choice = 1
print "you decide to hand them back to the teacher but you get expelled"
print "wrong choice you fail to pass high school you have a"
print "unsplended life and die of saddness"
suspend for key
goto hi
else
print "good choice you know better than to hand them back"
suspend for key
endif
cls
print "AFTER SCHOOL"
print "3:30"
suspend for key
cls
print "after school you meet your cheat crew they decide it's time they do some team work"
print "you team decides you should copy off james tomorrow instead of stealing it for your self"
print "what will you choose?"
print "1/2"
input choice
if choice = 1
print "you decide to copy off james tomorrow"
suspend for key
else
print "alex:NO way man I work alone"
print "hey what are you doing?"
print "your team mates take out a gun and shoot you, you die"
suspend for key
goto hi
endif
cls
Print "tomorow 10:00 am"
suspend for key
cls
Print "at the test james is right beside you this will be an easy one"
print "but with good things come bad things the teacher is walking around the"
print "class room will you take a risk and cheat?"
print "1/2"
input choice
if choice = 1
print "when the teacher turned alway you quickly copyed off james"
print "great work you passed the test"
suspend for key
else
print "ouch you don't even know the answers and you don't want to take a risk"
print "so you try to guess the answers but you got them all wrong"
print "the teacher calles you in after school and puts you back to playschool"
suspend for key
goto hi
endif
cls
print "the end of the year is near testes are over and you cheated off all of them"
suspend for key
cls
`more choices
`music change
stop music 1
`load new music
load music "xmas.mp3" ,2
loop music 2
print "the year is over it's christmas you decide to go to wal-mart to buy"
print "a game you see two games you have a choice of choose one which one will you get?"
print "1 Metroid prime three"
print "2 Rayman raving rabbids"
input choice
if choice = 1
print "you decide to by metroid prime three"
suspend for key
endif
if choice = 2
print "you decide to buy Rayman raving rabbids"
suspend for key
endif
cls
print "you go home to play you game on you wii"
suspend for key
cls
print "you have found an old christmas tree in the basement you have a choice"
print "of setting up the tree or not what will you choose?"
print "1 set up the tree"
print "2 don't set up the tree"
input choice
if choice = 1
print "you decide to set up the tree but the tree falls over you omg your dead"
suspend for key
stop music 2
goto hi
endif
if choice = 2
print "you decide not to set up the tree instead call someone to set it up for you"
Print "the tree falls over the guy and he dies horray at least you didn't die"
print "now the matter of getting rid of the dead bodies"
suspend for key
endif
cls
print "while playing you game your wii stops working you try to fix it in the back of"
print "the wii you see two cables unplugged a red and a blue cable which one will you choose?"
print "1 The red cable"
print "2 The blue cable"
input choice
if choice = 1
print "you plug in the red cable and the wii turns back on yay you fixed it"
suspend for key
endif
if choice = 2
print "you plug in the blue cable oh no the wii starts making weird noises and starts getting hot"
print "OMG it's going to explode you try to get out of the house but today was an unluckey day"
print "looks like you mom said good night and said kiss you butt good bye!!!"
suspend for key
stop music 2
goto hi
endif
cls
stop music 2
`new music
load music "halloween.mid" ,3
loop music 3
print "looks like halloween draws near it's time to get ready"
suspend for key
cls
print "you soon find out that you ran out of candy, so you go to wal-mart to buy some you find"
print "two types of candy you like which one do you want?"
print "1 choclate"
print "2 tropical bubblelicious"
input choice
if choice = 1
print "you decide to buy a box of choclate to hand out"
suspend for key
endif
if choice = 2
print "you decide to buy tropical bubblelicious to hand out this halloween"
suspend for key
endif
cls
print "you go home to hand out the candy but unexpectly the phone started ringing"
print "you pick up the phone but there was no one there you put down the phone"
print "but its starts ringing again you pickup the phone but still no one do you want to unplug the"
print "phone?"
print "1 yes"
print "2 no"
input choice
if choice = 1
print "you decide to unplug the phone but while you unplug the phone you forgot to lock the door"
print "someone gets in and while you unplug the last phone he pulls out hes gun and shoot you"
print "well I guess you could kiss the world good-bye"
suspend for key
stop music 3
goto hi
endif
if choice = 2
print "you know it might be a prank so you leave it plugged in"
print "at the door you decide it's time you take a break so you lock the door and lay on the mattress"
print "when all of a sudden theres a bang on the door"
print "Robber:Hand over all you money or I'll kick down the door and shoot you"
print "you quickly call the police and 5 mins later just as the Robber is about to kick the door down"
print "the cops arrive yay your safe"
suspend for key
endif
cls
`new music
stop music 3
load music "wow.mp3" ,4
loop music 4
`end of music code
print "SUMMER"
suspend for key
cls
print "summer has started and you and you friends decide to hang out togeter"
print "you decide to go to the switchbox to play games."
print "you and your friend have tried to beat someguy who clams to be the best gamer and if you beat him"
print "you win 1000 dollars but if you lose you have to give 1000 dollars, you and your friend know how to hack"
print "but it's up to you if you want to do it will you hack?"
print "1 hell yes"
print "2 hackings for losers"
input choice
if choice = 1
print "you and your friend decide to hack as soon as the game starts you"
print "start the hack the other guy loses you win"
print "1000 dollars!!!"
suspend for key
endif
if choice = 2
print "you decide hacking is for losers you try to beat the guy but he proves too much for you you"
print "have to pay him 1000"
print "dollars but you don't have the money, the guy pulls out the gun and shoots you and your friend "
print "you both dead"
print "better luck next time if there is a next time"
suspend for key
stop music 4
goto hi
endif
cls
print "now you and your friend have $500 each you decide to get more money they could hack paypal."
print "when you and your friend got home you decide to do a ddos attack on them but you and your "
print "friend can decide who"
print "should make the virus you have a choice of making the virus but knowing your past of making "
print "lame virus it might not work"
print "what will you choose?"
print "1 make the virus"
print "2 let you friend make the virus"
input choice
if choice = 1
print "you decide to make the virus although you make the virus and broke in to paypal you left traces"
print "of where the viruses came"
print "from. The next moring you wake up police are at your door you and your friend go to jail for the "
print "rest of you life the end"
suspend for key
stop music 4
goto hi
endif
if choice = 2
print "you let you friend do it know if you mess up you'll be in big trouble, you and your friend get away "
print "with billions of "
print "dollars horray"
suspend for key
endif
cls
`new music
stop music 4
load music "med.mp3" ,5
loop music 5
print "it's been 15 years now since the summer you stole billions of dollars"
print "you have cheated you way throught every school and now you been elected"
print "to go into space to find if there other life forms"
suspend for key
cls
print "as you go into space you think about your life you friends your family and if you'll every come back."
suspend for key
cls
print "5 Month later"
suspend for key
cls
print "5 months later you arrive in an undiscovered planet and"
print "suspriseingly you find other life forms"
print "you may want to exam them but you also rember not to go right aheah"
print "you don't know what they are"
print "you can choose to go right ahead and exam them or make friends and get to know"
print "them better first"
print "what will you do?"
print "1 go right ahead and exam"
print "2 make friends with them"
print "3 shoot them"
print "4 capture them"
input choice
if choice = 1
print "you decide to go aheah and exam them you they out of fear attack you"
print "you and your crew die"
suspend for key
stop music 5
goto hi
endif
if choice = 2
print "you decide to make friends with them let's hope it works out ok"
suspend for key
endif
if choice = 3
print "you decide to shoot them but they have even better wep then a gun"
print "you and your whole crew die"
suspend for key
stop music 5
goto hi
endif
if choice = 4
print "you try to capture them but they are stronger than they look they break out of the cage and destroyed your"
print "ship you and your crew were lead to their deaths!!"
suspend for key
stop music 5
goto hi
endif
cls
print "2 year later"
suspend for key
cls
print "you and your crew have made great friends with them, you are getting old now and you miss you family "
print "knowing"
print "you'll be old and won't have much longer to live you look at you new friends and explain things"
suspend for key
cls
print "Alex:Thank you I owe you so much"
print "you new friends decide to help you out by sending you back on their ship also they have asked if "
print "they could see planet earth what will you decide?"
print "1 sure thing"
print "2 sorry you can't"
input choice
if choice = 1
print "you go back to your planet with you new friends"
suspend for key
endif
if choice = 2
print "you go back to you planet earth never mentioning you trip to anyone"
print "and soon meet your family and soon after a few years you die of old "
print "age the end"
suspend for key
stop music 5
goto hi
endif
cls
stop music 5
load music "can.mp3" ,6
loop music 6
print "Back to earth"
suspend for key
cls
print "the time has come every thing has to come to an end looks like this is yours"
print "as you lay dying you look at you son you friends and your wife and say"
print "Alex:I'm sorry I've been such a bad farther son please forgive me I was... while"
print "I wasn't there for you when you needed me I was somewhere else trying to be"
print "famous.... I'm sorry."
print "eddie:It's ok dad I mean look what you did you found a new discoverly"
print "you made friends with aliens you found a new planet...dad?..."
print "hear these words made Alex cry and looking at his family and friends one"
print "more time and and almost sliently said thank you...good..bye.."
suspend for key
print "The End"
suspend for key
cls
print "play again?"
print "1 no"
print "2 yes"
input choice
if choice = 1
end
endif
if choice = 2
stop music 6
goto my
endif
`end of program