Posted 18 February 2013 - 07:57 PM
Title: [LUA] Nil Arg
How would I go about setting a variable to 1 if no args are input?
I want the program to set arg to 1 if no arguments are originally input following the execution.
How would I go about setting a variable to 1 if no args are input?
arg = (...)
arg = tonumber(arg)
x = 0
while x < arg do
if turtle.forward() == true then
x = x + 1
end
end
I want the program to set arg to 1 if no arguments are originally input following the execution.