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

Coroutine not working correctly

Started by dragonfreak1000, 21 December 2014 - 09:38 PM
dragonfreak1000 #1
Posted 21 December 2014 - 10:38 PM
I have this code:
http://pastebin.com/BLF2grca
And the time updates just fine, but my mouse events do not work. The coroutine is starting successfully, as it returns true. What is happening?
Lyqyd #2
Posted 21 December 2014 - 11:09 PM
You resumed it once, but then you never resume it again. You should read through the coroutine handling in the parallel API, to get a better idea of what coroutine management entails.
dragonfreak1000 #3
Posted 22 December 2014 - 12:25 AM
You resumed it once, but then you never resume it again. You should read through the coroutine handling in the parallel API, to get a better idea of what coroutine management entails.

Okay. I know that os.pullEventRaw() calls a yeild, but how would I go about making this work?