Posted 12 December 2012 - 02:34 AM
I tried to make a calculator but i ran into some errors that i can't figure out myself :/
I get this error: bios:338: [string "Calc"]:13: 'then' expected
The code goes like this:
local x
print ("Please enter a value: ")
x = read()
local z
print ("Please enter a math method: ")
z = read()
local y
print ("Please enter what to "..z.." with "..x..": ")
if z = + then
print (the answer is: "..x+y)
elseif z = - then
prin.. and so on.
Got any help for me? :3
I get this error: bios:338: [string "Calc"]:13: 'then' expected
The code goes like this:
local x
print ("Please enter a value: ")
x = read()
local z
print ("Please enter a math method: ")
z = read()
local y
print ("Please enter what to "..z.." with "..x..": ")
if z = + then
print (the answer is: "..x+y)
elseif z = - then
prin.. and so on.
Got any help for me? :3