Posted 19 July 2016 - 01:39 AM
Hate to bug you :l But I'm having a bit of an issue with arguments and I'm wondering if you could clear that up <3… I'm making my program much more simplified saving me about 3 lines every time I want to repeat something using arguments however, my curiosity is getting the better of me and I want to see if I can have an if statement that says ("if args = nil then args = 1") However the error is that a Then Is expected T_T … help
function forward( args )
if args = nil … = 1
for i = 1, … do
turtle.forward()
print("going forward!")
end
end
end
end
function back( … )
if … = nil then … = 1
for i = 1, … do
turtle.back()
print("going back!")
end
end
end
back()
forward()
function forward( args )
if args = nil … = 1
for i = 1, … do
turtle.forward()
print("going forward!")
end
end
end
end
function back( … )
if … = nil then … = 1
for i = 1, … do
turtle.back()
print("going back!")
end
end
end
back()
forward()