SA-MP Forums Archive
/startrace --> start timer --> server crash - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /startrace --> start timer --> server crash (/showthread.php?tid=153920)



/startrace --> start timer --> server crash - Jochemd - 11.06.2010

Hello,

I just made a command, /startrace. When I type it, it activates a 60-second timer. But then the server crashes.

pawn Код:
dcmd_startrace(playerid,params[])
{
    #pragma unused params
    SendClientMessageToAll(COLOR_GREEN,"The Kart race is going to start in 1 minute! Join by typing /joinrace!");
    SetTimerEx("OnKartRaceStart",60000,0,"is","playerid");
    return 1;
}
I forwarded it and the timer is empty, so no need to post them, I hope.

Regards, Jochem


Re: /startrace --> start timer --> server crash - Jeffry - 11.06.2010

Try:

pawn Код:
SetTimerEx("OnKartRaceStart",60000,0,"d",playerid);



Re: /startrace --> start timer --> server crash - Jochemd - 11.06.2010

Still a crash.


Re: /startrace --> start timer --> server crash - Jeffry - 11.06.2010

Can you post the "OnKartRaceStart"?


Re: /startrace --> start timer --> server crash - Jochemd - 11.06.2010

It's empty

pawn Код:
public OnKartRaceStart(playerid)
{
    return 1;
}



Re: /startrace --> start timer --> server crash - Jeffry - 11.06.2010

Have forwarded it?
Does it crash after the 60 seconds, or when you type the command?
Try to put something at the OnKartRaceStart, like: SetPlayerPos(playerid, 0,0,0); to see if it get's called anytime...


Re: /startrace --> start timer --> server crash - Jochemd - 11.06.2010

It crashes immediatly after typing the command, I will add some SendClientMessage.

EDIT: The SendClientMessageToAll doesnt get called.


Re: /startrace --> start timer --> server crash - Jeffry - 11.06.2010

Try to remove the
pawn Код:
SendClientMessageToAll(COLOR_GREEN,"The Kart race is going to start in 1 minute! Join by typing /joinrace!");
maybe there is a mistake in the COLOR_GREEN.


Re: /startrace --> start timer --> server crash - Jochemd - 11.06.2010

No, because I defined it with the SAMP Colordefiner And it worked before


Re: /startrace --> start timer --> server crash - Jeffry - 11.06.2010

Hm, well, i have to go in some mins, so I will try this out tomorrow for you, if nobody else knowns any solution.