/engine timer bug
#4

You're using SetTimer, and not SetTimeEx.

pawn Код:
SetTimer("StartEngine", 2000, false);
With SetTimer, you can't pass extra parameters, watch this code:

pawn Код:
public StartEngine(const playerid)
StartEngine has 1 parameter which is "playerid" but can't be passed because you're using SetTimer, however, if you did this:

pawn Код:
SetTimerEx("StartingEngine", 2000, false, "d", playerid);
First you put the specifiers to know how many parameters you want to pass, and their type, then list them.
You could even do this:

pawn Код:
SetTimerEx("StartEngine", 2000, false, "dd", playerid, vehicleid);
This is how you do it with multiple parameters.

For future reference, you don't have to use the 'const' keyword in this situation, as it becomes a read-only variable that can't be altered by the program after initialised, at least in C / C++.
Reply


Messages In This Thread
/engine timer bug - by Eric - 14.08.2012, 04:05
Re : /engine timer bug - by BigBaws - 14.08.2012, 04:11
Re: Re : /engine timer bug - by Eric - 14.08.2012, 04:12
Re: /engine timer bug - by admantis - 14.08.2012, 04:19
Re: /engine timer bug - by Eric - 14.08.2012, 04:21

Forum Jump:


Users browsing this thread: 1 Guest(s)