Posted 06 April 2014 - 02:41 AM
Hey just an error that I cant fix nor can I find anything on the web to help me solve this.
ATM1:12:attempt to compare nil with number
ATM1:12:attempt to compare nil with number
term.clear()
local balance = 100
repeat
term.setCursorPos(1,1)
term.setTextColor(colors.red)
term.write("====sflynn's User Friendly Banking balance = "..balance.."====")
term.setTextColor(colors.blue)
term.setCursorPos(1,2)
term.write("how much would you like to withdraw: ")
local withdraw = tonumber(read())
while withdraw > balance and balance > 0 do
balance = balance - withdraw --balance = balance [b]minus[/b] withdraw
end