Why its says this when i compile?
#1

Quote:

C:\Users\Jacob\Desktop\Basic RP Script Scratch FIX\gamemodes\U1.pwn(562) : error 017: undefined symbol "Team"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Код:
CMD:stats(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		new
			string[ 128 ],
			Age = PlayerInfo[ playerid ][ pAge ],
			Money = GetPlayerCash( playerid )
		;

		new Sex[20];
		if(PlayerInfo[ playerid ][ pSex ] == 1) { Sex = "Male"; }
		else if(PlayerInfo[ playerid ][ pSex ] == 2) { Sex = "Female"; }

		SendClientMessage(playerid, COLOR_LIGHTBLUE, "------------------------------------------------------------------------");
		format(string, sizeof(string), "Name: %s | Money: %d | Age: %d | Sex: %s | Team: %s | Accent: %d | Skin: %d", RPName(playerid), Money, Age, Sex, Team, Accent, Skin);
        SendClientMessage(playerid, COLOR_GRAD2, string);
	}
	return 1;
}
Reply
#2

Which line is 564?
Reply
#3

This is 564 line
Quote:

CMDtats(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new
string[ 128 ],
Age = PlayerInfo[ playerid ][ pAge ],
Money = GetPlayerCash( playerid )
;

Reply
#4

Obviously it's this one
pawn Код:
format(string, sizeof(string), "Name: %s | Money: %d | Age: %d | Sex: %s | Team: %s | Accent: %d | Skin: %d", RPName(playerid), Money, Age, Sex, Team, Accent, Skin);
Now, I think you want to use something like PlayerInfo[playerid][Team] here.. You didn't declare the 'Team' variable, not globally nor locally. Be sure to add it and give it a value.
Reply
#5

Where should i add this one?

PlayerInfo[playerid][Team]
Reply
#6

It should be added in the enum that is linked with PlayerInfo.
Reply
#7

pawn Код:
CMD:stats(playerid, params[])
    {
        if(IsPlayerConnected(playerid))
        {
            new string[128], Sex[20], Age = PlayerInfo[playerid][pAge], Team = PlayerInfo[playerid][pTeam], Money = GetPlayerCash(playerid);

            if(PlayerInfo[ playerid ][ pSex ] == 1) { Sex = "Male"; }
            else if(PlayerInfo[ playerid ][ pSex ] == 2) { Sex = "Female"; }

            SendClientMessage(playerid, COLOR_LIGHTBLUE, "------------------------------------------------------------------------");
            format(string, sizeof(string), "Name: %s | Money: %d | Age: %d | Sex: %s | Team: %s | Accent: %d | Skin: %d", RPName(playerid), Money, Age, Sex, Team, Accent, Skin);
            SendClientMessage(playerid, COLOR_GRAD2, string);
        }
        return 1;
    }
Search for 'enum pInfo' in pawno and add 'pTeam' with the rest of the variables.
Also add the team variable in all player saving and loading callbacks.
Sorry about the indent issue
Reply
#8

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)