Posted 24 March 2013 - 08:26 AM
This is giving me a "quiz2:1: attempt to call nil" error. I'm used to programming outside of minecraft, like java c sharp and javascript. Though i can't see what I'm doing wrong….
Thanks in advance!
question("What year is it?","2012","1564","2013","3")
function question(qu,a1,a2,a3,c)
term.clear()
term.setCursorPos(1,1)
print(qu)
sleep(2)
print("1. "+a1)
sleep(1)
print("2. "+a2)
sleep(1)
print("3. "+a3)
sleep(1)
print("Please enter the correct number below:")
ans = read()
if ans == c then
print("CORRECT! Good job!")
sleep(2)
else
print("WRONG! Noob!")
end
end
Thanks in advance!