This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
foregg's profile picture

OpenCCSensor's getTargetDetails() hangs and I don't know why.

Started by foregg, 30 March 2015 - 03:59 PM
foregg #1
Posted 30 March 2015 - 05:59 PM
http://pastebin.com/YHDj4vhL

Line 104. Using good ol' print debugging, the first print statement prints, then the second one prints, but it appears that getTargetDetails never returns and the script comes to a dead halt. What am I doing wrong?
Lyqyd #2
Posted 30 March 2015 - 06:15 PM
That should work fine. What version of OpenCCSensors are you using?
foregg #3
Posted 30 March 2015 - 06:20 PM
My jar is called "openccsensors-1.7.3.jar", and it was downloaded from the first link in this post.

Update: If I put an os.pullEvent() right before getTargetDetails is called, and then mouseclick or press a key, 'got deets' prints. What?

And if I put a sleep() it works too. So is this the lua interpreter being fussy?