/startrace --> start timer --> server crash
#1

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
Reply
#2

Try:

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

Still a crash.
Reply
#4

Can you post the "OnKartRaceStart"?
Reply
#5

It's empty

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

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...
Reply
#7

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

EDIT: The SendClientMessageToAll doesnt get called.
Reply
#8

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.
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)