Problem with SetTimer
#1

Ok I want to do something as a CS server on the SAMP, but I have a problem with the command settimer... look
Код:
public reborn1(playerid)
{
SetPlayerPos(playerid, 208,1869,13);
return 1;
}
I added the forward, and the player's death

Код:
if (PlayerDied [playerid] == 1)
         {
         SetTimerEx("reborn1", 15000, 0);
         }
Код:
forward reborn1 ();
Warning & Error Message:

Код:
warning 202: number of arguments does not match definition
error 025: function heading differs from prototype
Reply
#2

pawn Код:
forward reborn1(playerid);
You need to insert the playerid parameter in your forward, this fixes your 'function heading differs from prototype' problem.

pawn Код:
SetTimerEx("reborn1", 15000, false, "d", playerid);
You were not using SetTimerEx correctly, the wiki clearly states the correct format.

The code I have created above for you will work, it will call in 15 seconds with the playerid parameter. You need to direct the function to the playerid parameter, so it knows what it's supposed to be dealing with.

Next time, post in the Scripting Discussion section.
Reply
#3

Thank you very much, I'm new in scripting and on forum .... so tnx


Quote:
Originally Posted by Calgon
Посмотреть сообщение
Next time, post in the Scripting Discussion section.
Sorry


I would give you rep+ but already am
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)