start of function body without function header - 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)
+--- Thread: start of function body without function header (
/showthread.php?tid=544054)
start of function body without function header [Resolved] -
Aerotactics - 30.10.2014
This timer I set up is outputting an error, and I'm not sure why. It is forwarded, all the shortened word (like SCM, pid) are all defined, the only thing different from a regular settimer is I gave this one a variable.
Resolution: that tiny semicolon on the header shouldnt be there.
pawn Код:
TIMER_GAMESTART = SetTimer("GameStart", 60000, true);
public GameStart();
{
if(PlayersConnected >= 3)
{
if(GameJoin == true)
{
new PlayersReady = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if PlayerReady[i] = true;
{
PlayersReady++;
}
}
else continue;
}
if(PlayersReady >= 3)
{
SCMA(COLOR_GOLD, "The game is starting! All ready tributes will be placed in the arena.");
GameJoin = false;
KillTimer(TIMER_GAMESTART);
}
else SCMA(COLOR_GREEN, "Not enough tributes were ready.")
}
else
{
GameJoin = true;
SCMA(COLOR_GREEN, "The arena is ready. All tributes please ready (/ready) to enter the arena.")
}
}
else SCMA(COLOR_GREEN, "The game was not joinable because there aren't enough tributes online.")
return 1;
}
Re: start of function body without function header -
austin070 - 30.10.2014
pawn Код:
forward GameStart();
public GameStart()
{
...
return 1;
}
The semicolon goes on the forward, not the actual callback.
Edit: I didn't realize you fixed it already.