Posted 22 July 2012 - 05:54 AM
When trying to make my own slot machine i made this code:
math.randomseed( os.time() * 1000)
e, p1, p2 = os.pullEventRaw("redstone")
num = math.random(1,5)
num2 = math.random(1,5)
num3= math.random(1,5)
e, p1, p2 = os.pullEventRaw("redstone")
term.clear()
term.setCursorPos(1,4)
print " -------------"
print(" | "..num.." | "..num2.." | "..num3.." |")
print " -------------:"
and then it says slot:9: attempt to call number
FYI: everything works including the os.pullEventRaw stuff, and my program is named "slot"