SA-MP Forums Archive
Help me fix these errors - 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: Help me fix these errors (/showthread.php?tid=531574)



Help me fix these errors - TheK0kY - 13.08.2014

So my friend was scripting a Cops and Robbers GM and he went in troubles and cant fix following errors:

C:\Users\Jovan\Desktop\DOK\gamemodes\DOK.pwn(2825) : error 029: invalid expression, assumed zero
C:\Users\Jovan\Desktop\DOK\gamemodes\DOK.pwn(2825) : error 029: invalid expression, assumed zero
C:\Users\Jovan\Desktop\DOK\gamemodes\DOK.pwn(2825) : error 017: undefined symbol "PlayerName"
C:\Users\Jovan\Desktop\DOK\gamemodes\DOK.pwn(2825) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

these are the lines:

2835tock GetPlayerID(const PlayerName[])
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, PlayerName, sizeof(pName));
if(strcmp(Name, PlayerName, true)==0)
{
return i;
}
}
}
return -1;
}