While creating a function for finding the center of the screen, i come across an issue.
I read up on the return statement to see if I was using it wrong and from what I could gather I was using it correctly.
Code:
function term.getCenter() local hscreenX = screenX / 2 local hscreenY = screenY / 2 do return hscreenX, hscreenY end end
screenX and screenY are called earlier with
screenX, screenY = term.getSize()
When I test this function out, it returns Y as nil.
Code in test program:
local x, y = term.getCenter() print(tostring(x)) print(tostring(y))











