Hero192 Posted February 24, 2016 Posted February 24, 2016 Can I know why this cause a warning, the warning on debug says, bad argument 3 setTimer(removeEventHandler,5000,1,"onClientRender",root,dxDraw)
ozulus Posted February 24, 2016 Posted February 24, 2016 setTimer(function() removeEventHandler("onClientRender", root, dxDraw) end, 5000, 1)
Hero192 Posted February 24, 2016 Author Posted February 24, 2016 But why this doesn't work? setTimer(removeEventHandler,5000,1,"onClientRender",root,dxDraw)
SpecT Posted February 24, 2016 Posted February 24, 2016 Because to set a timer there should be a function to execute after time. You can make that function inside the setTimer as ozulus did or make it outside and then put the function name and the arguments in the timer. This is how it works and we can't do anything about it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now