SA-MP Forums Archive
Fast help with a 4 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Fast help with a 4 errors.... (/showthread.php?tid=242047)



Fast help with a 4 errors.... - ricardo178 - 19.03.2011

Hey guys, i get this erros:
Код:
C:\Users\Ricardo\Desktop\adminric.pwn(87) : error 017: undefined symbol "gLogged"
C:\Users\Ricardo\Desktop\adminric.pwn(87) : warning 215: expression has no effect
C:\Users\Ricardo\Desktop\adminric.pwn(87) : error 001: expected token: ";", but found "]"
C:\Users\Ricardo\Desktop\adminric.pwn(87) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\adminric.pwn(87) : fatal error 107: too many error messages on one line

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


4 Errors.
On this litle code:
pawn Код:
public OnPlayerConnect(playerid)
{
     if(gLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR, "SERVER: You have not logged in yet.");
        Kick(playerid);
        return 1;
    }
}
Thanks


Re: Fast help with a 4 errors.... - Biesmen - 19.03.2011

On the top of your script, below the defines, type this:

pawn Код:
new gLogged[MAX_PLAYERS];
Edit: But are you sure you'll put that at OnPlayerConnect and not OnPlayerSpawn? It will kick all players who will connect to your serve,r lol.