Posted 20 August 2012 - 03:31 PM
I was trying to make a program and I wanted to make the coding simpler to code, so I created a function that clears the screen and sets the cursor position to (1,1). When I try this, it gives me a "client:4:attempt to call nil" error. The code is below of a test program I made to show the error.
Please help :P/>/> Thank you.
EDIT: Do I have to put the function before anything else?
EDIT2: Fixed it. You do :D/>/>
print("Type 1 to clean")
type = io.read()
if type == "1" then
clean()
end
function clean()
term.clear()
term.setCursorPos(1,1)
end
Please help :P/>/> Thank you.
EDIT: Do I have to put the function before anything else?
EDIT2: Fixed it. You do :D/>/>