-Jigsaw Posted December 27, 2012 Posted December 27, 2012 (edited) What I got: addEventHandler("onResourceStart", root, startTimer) function startTimer() if not question then tInterval = math.random(180000, 360000) setTimer(postQuestion, tInterval, 1) end end What I get: Bad argument @ ' addEventHandler'[Expected function at aergument 3, got nil] Anybody knows what's wrong I seriously don't see nothing being wrong Edited December 27, 2012 by Guest
Castillo Posted December 27, 2012 Posted December 27, 2012 The event handler should go after the function creation. function startTimer() if not question then tInterval = math.random(180000, 360000) setTimer(postQuestion, tInterval, 1) end end addEventHandler("onResourceStart", resourceRoot, startTimer) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-Jigsaw Posted December 27, 2012 Author Posted December 27, 2012 Damn, really stupid.. Anyway, thx bro!
Castillo Posted December 27, 2012 Posted December 27, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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