Posted 25 January 2015 - 04:15 AM
Hi there.
I am writing a display API for a few programs I am working on.
Problem is I can't even get the first function to work.
Here's the code I have so far:
Every time I run the function, I get the error window:248: bad argument: double expected, got nil
Can anyone tell me what's up?
I am writing a display API for a few programs I am working on.
Problem is I can't even get the first function to work.
Here's the code I have so far:
local display = term
local tX, tY = display.getSize()
function centerAlign(text,y)
display.setCursorPos(tX/2-#text/2,y)
display.print(text)
end
Every time I run the function, I get the error window:248: bad argument: double expected, got nil
Can anyone tell me what's up?