error 010: invalid function or declaration - 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: error 010: invalid function or declaration (
/showthread.php?tid=636214)
error 010: invalid function or declaration -
TomRedlake - 22.06.2017
Код:
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(625) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(627) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(629) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(631) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(633) : error 021: symbol already defined: "SendMessageToAllPlayersInLobby1"
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(633) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(634) : error 021: symbol already defined: "SendMessageToAllPlayersInLobby1"
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(634) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(638) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(640) : error 021: symbol already defined: "SendMessageToAllPlayersInLobby1"
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(640) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(643) : error 010: invalid function or declaration
C:\Users\1\Desktop\samp\gamemodes\tdm.pwn(98) : warning 204: symbol is assigned a value that is never used: "lobbyonetimer"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
12 Errors.
Код:
function CheckToStartCountdownL1()
{
for(new i; i < MAX_LOBBY; i++)
{
if(Lobby[IsStartedLobbyOne] == 0)
{
if(GameInfo[i][LobbyOnePlayers] >= 2)
{
SendMessageToAllPlayersInLobby1(-1,"SERVER: 2 players are in lobby, countdown is starting");
SendMessageToAllPlayersInLobby1(-1,"SERVER: 30 Seconds until game starts");
Lobby[IsStartedLobbyOne] = 1;
KillTimer(lobbyonetimer);
}
else if(GameInfo[i][LobbyOnePlayers] >= 1)
{
SendMessageToAllPlayersInLobby1(-1,"SERVER: Not enough players to start countdown! (2 players needed)");
}
}
return 1;
}
}
Re: error 010: invalid function or declaration -
rolex - 23.06.2017
The
"function" word before your function is the problem.
Remove it or change for
"stock".
PHP код:
stock CheckToStartCountdownL1()
{
for(new i; i < MAX_LOBBY; i++)
{
if(Lobby[IsStartedLobbyOne] == 0)
{
if(GameInfo[i][LobbyOnePlayers] >= 2)
{
SendMessageToAllPlayersInLobby1(-1,"SERVER: 2 players are in lobby, countdown is starting");
SendMessageToAllPlayersInLobby1(-1,"SERVER: 30 Seconds until game starts");
Lobby[IsStartedLobbyOne] = 1;
KillTimer(lobbyonetimer);
}
else if(GameInfo[i][LobbyOnePlayers] >= 1)
{
SendMessageToAllPlayersInLobby1(-1,"SERVER: Not enough players to start countdown! (2 players needed)");
}
}
}
return 1;
}