Jump to content




help


  • You cannot reply to this topic
2 replies to this topic

#1 SpencerBeige

  • Members
  • 263 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!

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (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)


#3 SpencerBeige

  • Members
  • 263 posts

Posted 16 February 2015 - 01:47 AM

thx!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users