283 posts
Posted 16 February 2015 - 01:19 AM
print(parrallel.waitForAny(os.pullEvent("timer"), os.pullEvent("mouse_click")))
returns:
EXPECTED FUNCTION!!!! GOT STRING U IDIOT!
7083 posts
Location
Tasmania (AU)
Posted 16 February 2015 - 01:22 AM
os.pullEvent() does indeed return a string, among other things. You can't tell parallel.waitForAny() to run a string.
If you want parallel.waitForAny() to run functions with specific parameters, then you'll need to encapsulate your calls within other, new functions. Eg:
parallel.waitForAny(function() os.pullEvent("timer") end, function() os.pullEvent("mouse_click") end)
283 posts
Posted 16 February 2015 - 01:47 AM
thx!