error 017: undefined symbol "PlayerInfo"
#1

Error is on line 70.

here is my enum and whatnot. I hope I typed it write.
Код:
//Player Stats
enum pInfo
{
		pPass,
		pCash,
		pAdmin,
		pMod,
		pVIP,
		pKills,
		pDeaths,
		pLevel,
		pHours,
		//What else under /stats?
}


new PlayersInfo[MAX_PLAYERS][pInfo];

// Adding varibles to .ini
forward LoadUser_data(playerid, name[], value[]);
public LoadUser_data(playerid, name[], value[])
{
	INI_Int("Password",PlayerInfo[playerid][pPass]);
	INI_Int("Cash", PlayerInfo[playerid][pCash]);
	INI_Int("Admin", PlayerInfo[playerid][pAdmin]);
	INI_Int("Mod", PlayerInfo[playerid][pMod];
	INI_Int("VIP", PlayerInfo[playerid][[pVIP];
	INI_Int("Kills", PlayerInfo[playerid][pKills];
	INI_Int("Deaths", PlayerInfo[playerid][pDeaths];
	INI_Int("Level", PlayerInfo[playerid][pLevel];
	INI_Int("Hours", PlayerInfo[playerid][pHours];
	return 1;
}


//Name of .ini file
stock UserPath(playerid)
{
	new string[128], playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, sizeof(playername));
	format(string, sizeof(string),PATH,playername);
	return string;
}

//Hasher
stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}
ok. i obviously didnt type it right, but yeah. If someone could give me some assistance, that would be appreciated. Thanks guys.
Reply
#2

Quote:
Originally Posted by canadianclass
Посмотреть сообщение
Код:
new PlayersInfo[MAX_PLAYERS][pInfo];
Change it to
pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#3

The technicalities always bite me in the ass.


Thanks man.
Reply
#4

I noticed that the password is being loaded as an integer entry. Unless all the players who play your server only have numbers in their passwords, this will cause a problem.

You might want to try something like this:

pawn Код:
//For the password variable, you have to add the size of the variable

pPass[128], //128 should be a good size, however idk how many characters the hasher you use allows, so change accordingly
pCash,
//etc

//then, to load the password as a string

INI_String("Password",PlayerInfo[playerid][pPass], 128);
This should work, PM if it doesn't.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)