SA-MP Forums Archive
error 017: undefined symbol "PlayerName" - 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 017: undefined symbol "PlayerName" (/showthread.php?tid=298010)



error 017: undefined symbol "PlayerName" - [DC] - 18.11.2011

I'm geting this error and i don't know how to fix it.

Code:
PHP код:
if(PLAYERLIST_authed[playerid] == 1)
    {
        
dUserSetINT(PlayerName(playerid)).("Bankcash",BankCash[playerid]);
        
dUserSetINT(PlayerName(playerid)).("Cash",GetPlayerMoney(playerid));
        
dUserSetINT(PlayerName(playerid)).("Score",GetPlayerScore(playerid));
         
dUserSetINT(PlayerName(playerid)).("Adminlevel",AdminLevel[playerid]);
        
dUserSetINT(PlayerName(playerid)).("Army",CanUseArmy[playerid]);
        
dUserSetINT(PlayerName(playerid)).("CIA",CanUseCIA[playerid]);
        
dUserSetINT(PlayerName(playerid)).("RegularPlayer",IsRegularPlayer[playerid]);
        
dUserSetINT(PlayerName(playerid)).("DrugHouseOwner",DrugHouseOwner[playerid]);
        
dUserSetINT(PlayerName(playerid)).("OttoOwner",OttoOwner[playerid]);
        
dUserSetINT(PlayerName(playerid)).("TSkill",TerroristSkill[playerid]);
        
dUserSetINT(PlayerName(playerid)).("RobSkill",RobSkill[playerid]);
        
dUserSetINT(PlayerName(playerid)).("HasPackC4",HasPackC4[playerid]);
        
dUserSetINT(PlayerName(playerid)).("HasPackRope",HasPackRope[playerid]);
        
dUserSetINT(PlayerName(playerid)).("HasPackMoney",HasPackMoney[playerid]);
        
dUserSetINT(PlayerName(playerid)).("SavedWantedLevel",SavedWantedLevel[playerid]);
        
dUserSetINT(PlayerName(playerid)).("SavedJailTime",SavedJailTime[playerid]);
    } 
And as the title says, i'm geting this error:
PHP код:
error 017undefined symbol "PlayerName" 



Re: error 017: undefined symbol "PlayerName" - oliverrud - 18.11.2011

You haven't defined the stock/function "PlayerName"


Respuesta: error 017: undefined symbol "PlayerName" - [DC] - 18.11.2011

Do you mean this?
PHP код:
stock GetPlayerID(const Name[])
{
    for(new 
ii<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            new 
pName[MAX_PLAYER_NAME];
            
GetPlayerName(ipNamesizeof(pName));
            if(
strcmp(NamepNametrue)==0)
            {
                return 
i;
            }
        }
    }
    return -
1;




Re : error 017: undefined symbol "PlayerName" - KillerDVX - 29.05.2015

Try :

PHP код:
stock PlayerName(playerid) {
  new 
name[255];
  
GetPlayerName(playeridname255);
  return 
name;