Undefined symbol: player1
#1

Hey guys I am making a textdraw to get player score, money, kills, deaths.

What I use:

PHP Code:
Web TextDrawCreate(485.00000010.000000"Scores: %d | Money: $%d | Kills: %d | Deaths: %d | K/D Ratio: %0.2f"GetPlayerScore(playerid), GetPlayerScore(player1), GetPlayerMoney(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths);
    
TextDrawBackgroundColor(Web255);
    
TextDrawFont(Web3);
    
TextDrawLetterSize(Web0.3300001.200000);
    
TextDrawColor(Web, -1);
    
TextDrawSetOutline(Web1);
    
TextDrawSetProportional(Web1);
    
TextDrawSetShadow(Web,1); 
Error:

PHP Code:
C:\Users\Administrator\Desktop\ProjectSvT\gamemodes\SvTMike.pwn(1464) : error 017undefined symbol "playerid" 
I also used it with a command (/stats):

PHP Code:
#if defined USE_STATS
CMD:stats(playerid,params[]) {
    new 
string[100], pDeathsplayer1hms,playername[MAX_PLAYER_NAME];
    if(
isnull(params)) player1 playerid;
    else 
player1 strval(params);
    if(
IsPlayerConnected(player1)) {
        
TotalGameTime(player1hms);
        
GetPlayerName(player1playernamesizeof(playername));
         if(
PlayerInfo[player1][Deaths] == 0pDeaths 1; else pDeaths PlayerInfo[player1][Deaths];
         new 
str[120], str1[100], str2[100];
         
format(strsizeof(str),"| ------ | %s's Status | ------- |"PlayerName2(player1));
        
format(string,sizeof(string),"Scores: %d | Money: $%d | Kills: %d | Deaths: %d | K/D Ratio: %0.2f"GetPlayerScore(player1), GetPlayerMoney(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths);
        
format(str1sizeof(str1),"Admin Level: %d | Moderator: %s | Rank: %s | Team: %s | Class: %s"PlayerInfo[player1][Level], PlayerInfo[player1][Helper] ? ("Yes") : ("No"), GetRankName(player1), GetTeamName(player1), GetClass(player1));
        
format(str2sizeof(str2),"TimePlayed: [%d] hrs [%d] mins [%d] secs"hms);
        
SendClientMessage(playerid0xFFFFFFFF,str);
        
SendClientMessage(playerid0xAAAAAAFF,string);
        
SendClientMessage(playerid0xAAAAAAFF,str1);
        
SendClientMessage(playerid0xAAAAAAFF,str2);
        
SendClientMessage(playerid0xFFFFFFFF,"| ---------------------------------------------------- |");
    } else return 
SendClientMessage(playeridred"Player Not Connected!");
    return 
1;
}
#endif 
HELP !
Reply


Messages In This Thread
Undefined symbol: player1 - by Fantje - 12.03.2015, 14:47
Re: Undefined symbol: playerid while IS defined - by ATGOggy - 12.03.2015, 14:51
Re: Undefined symbol: playerid while IS defined - by Fantje - 12.03.2015, 14:57
Re: Undefined symbol: playerid while IS defined - by ATGOggy - 12.03.2015, 14:59
Re: Undefined symbol: player1 - by Fantje - 12.03.2015, 14:59
Re: Undefined symbol: player1 - by Fantje - 12.03.2015, 15:02
Re: Undefined symbol: player1 - by ATGOggy - 12.03.2015, 15:03
Re: Undefined symbol: player1 - by Fantje - 12.03.2015, 15:05
Re: Undefined symbol: player1 - by ATGOggy - 12.03.2015, 15:10
Re: Undefined symbol: player1 - by Fantje - 12.03.2015, 15:20

Forum Jump:


Users browsing this thread: 1 Guest(s)