Posted 08 October 2012 - 10:29 AM
print("Calculator:)
write"Number 1"
input = read()
num1 = input
write"Number 2"
input = read()
num2 = input
write"Action"
input = read()
act = input
string.format("%f %f %f, num1, act, num2)
I am trying to make an easy calculator, however, I am having trouble converting the "act" variable into
a usable math character I get this error: "Calc:14: bad argument: number expected, got string"
any help or ideas would be greatly appreciated.
Thanks
write"Number 1"
input = read()
num1 = input
write"Number 2"
input = read()
num2 = input
write"Action"
input = read()
act = input
string.format("%f %f %f, num1, act, num2)
I am trying to make an easy calculator, however, I am having trouble converting the "act" variable into
a usable math character I get this error: "Calc:14: bad argument: number expected, got string"
any help or ideas would be greatly appreciated.
Thanks