SA-MP Forums Archive
Undefined symbol playerid O.o - 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: Undefined symbol playerid O.o (/showthread.php?tid=168569)



Undefined symbol playerid O.o - FireCat - 16.08.2010

Код:
   new PlayerName[MAX_PLAYER_NAME],
    string[128];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); // playerid unfefined here
    format(string, sizeof(string), "%s has tried to rcon login.", PlayerName);
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
i dont get why it says:
Код:
C:\Users\james\Desktop\serverrrrr\gamemodes\Gamemode.pwn(813) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase



Re: Undefined symbol playerid O.o - (.Aztec); - 16.08.2010

You cannot tell a players ID number through RconLoginAttempt. You'll have to log their IP Address instead. See "GetPlayerIp" on the SA:MP wiki.


Re: Undefined symbol playerid O.o - akis_tze - 16.08.2010

check your forward and the public if contains playerid


Re: Undefined symbol playerid O.o - FireCat - 16.08.2010

i want when someone trys to rcon login his name appears say he tried to login


Re: Undefined symbol playerid O.o - Carlton - 16.08.2010

pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
    if(!success) {
          for(new i = 0; i < GetMaxPlayers(); i ++ ) {
                new ipx[16];
                GetPlayerIp(i, ipx, 16);
                if(!strcmp(ipx, ip)) {
                      new PlayerName[MAX_PLAYER_NAME], string[128];
                      GetPlayerName(i, PlayerName, sizeof(PlayerName)); // playerid unfefined here
                      format(string, sizeof(string), "%s has tried to rcon login.", PlayerName);
                      SendClientMessageToAll(COLOR_RED, string);
                      break;
                }
          }
     }
}



Re: Undefined symbol playerid O.o - Kevin_Joshen - 16.08.2010

Quote:
Originally Posted by CarltonTheGG
Посмотреть сообщение
pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
    if(!success) {
          for(new i = 0; i < GetMaxPlayers(); i ++ ) {
                new ipx[16];
                GetPlayerIp(i, ipx, 16);
                if(!strcmp(ipx, ip)) {
                      new PlayerName[MAX_PLAYER_NAME], string[128];
                      GetPlayerName(i, PlayerName, sizeof(PlayerName)); // playerid unfefined here
                      format(string, sizeof(string), "%s has tried to rcon login.", PlayerName);
                      SendClientMessageToAll(COLOR_RED, string);
                      break;
                }
          }
     }
}


beat me to it! ARG!!