Death Posted March 1, 2015 Posted March 1, 2015 local pre_ataque[zona] = setTimer(function() if iniciando[zona] <= 100 then iniciando[zona] = members_in_turf[team][zona] + iniciando[zona] else Atacar(thePlayer,zona,group,gang) end end,500,0) function tester(thePlayer,zona) local gang = getPlayerTeam(thePlayer) local team = getTeamName(gang) local timerr[thePlayer] = setTimer(function() triggerClientEvent(thePlayer, "onPreAtaque", thePlayer, iniciando[zona], zona) end,500,0) end function Atacar(thePlayer,zona,group,gang) zoned = zona outputChatBox (zoned) killTimer(iniciando[zoned]) killTimer(timerr[thePlayer]) triggerClientEvent(thePlayer, "onIniciarAtaque", thePlayer, zoned) end
Death Posted March 1, 2015 Author Posted March 1, 2015 Bad argument @ 'killTimer' [Expected lua-timer at argument 1] Bad argument @ 'killTimer' [Expected lua-timer at argument 1, got number '101'] two killtimer not work
Moderators IIYAMA Posted March 2, 2015 Moderators Posted March 2, 2015 if isTimer(iniciando[zoned]) then killTimer(iniciando[zoned]) end iniciando[zoned]= nil -- clean up You can't kill a timer which doesn't exist any more.
Death Posted March 2, 2015 Author Posted March 2, 2015 resolved. I was trying to kill a variable instead of the timer. hugs
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