I'm trying to get a little program set up to out the cords of the screen pixels when I click them. I looked around but still could not find one. One that I did find on Open-computers forum did not work. Here is my code.
function touchsig(_, x, y, _, _)
print("Xcord: " .. x .. "Ycord: " .. y)
end
while true do
event.listen("touch", touchsig)
end
Whenever I run it I get.
/cords:5: attempt to index global 'event' (a nil value)
stack traceback:\
/cords:5: in main chunk
(...tail calls...)
Any Ideas on how to fix this?
Also off topic but I'm doing this because I want to make a "spiffy" Big Reactors controller. Should I use OpenComputers like I planned or just settle with the OP Computercraft?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I'm trying to get a little program set up to out the cords of the screen pixels when I click them. I looked around but still could not find one. One that I did find on Open-computers forum did not work. Here is my code.
Whenever I run it I get.
Any Ideas on how to fix this?
Also off topic but I'm doing this because I want to make a "spiffy" Big Reactors controller. Should I use OpenComputers like I planned or just settle with the OP Computercraft?
Link to post
Share on other sites