Posted 25 February 2012 - 07:26 PM
So here's my code:
And every time you get it right or wrong it always say Incorrect.
I even made it output the number and it's still not right.
Suggestions?
term.clear()
term.setCursorPos(1,1)
random = math.random(1,10)
textutils.slowPrint("Guess The Number Game!")
print("Random Number = "..random)
sleep(2)
term.clear()
term.setCursorPos(1,1)
textutils.slowWrite("Guess A Number Between 1 And 10: ")
number = read()
sleep(2)
term.clear()
term.setCursorPos(1,1)
if number == random then
textutils.slowPrint("Well Done! Have A Cookie (:")
redstone.setOutput("back",true)
sleep(1)
term.clear()
term.setCursorPos(1,1)
redstone.setOutput("back", false)
textutils.slowPrint("Enjoy! :)/>/>")
sleep(2)
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Shutting Down...")
sleep(2)
os.shutdown()
else
textutils.slowPrint("Incorrect :(/>/>")
sleep(2)
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Shutting Down...")
sleep(2)
os.shutdown()
end
And every time you get it right or wrong it always say Incorrect.
I even made it output the number and it's still not right.
Suggestions?