Y_INI Stats Command Errors
#1

Hello!!

For some reason when I compile my script, it gives me these errors:

Код:
C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : error 022: must be lvalue (non-constant)
C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : warning 215: expression has no effect
C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : error 001: expected token: ";", but found "]"
C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : fatal error 107: too many error messages on one line
Код:
Line 530: Adminlevel = PlayerInfo[playerid][Adminlevel];
Here is the whole Stats command:

Код:
CMD:stats(playerid, params[])
{
	new sString[128];
  	Adminlevel = PlayerInfo[playerid][Adminlevel];
   	money = PlayerInfo[playerid][Money];
    score = PlayerInfo[playerid][Score];
    deaths = PlayerInfo[playerid][Deaths];
    kills = PlayerInfo[playerid][Kills];

	format(sString,sizeof(sString), "Admin Level: %d | Money: %d | Score: %d | Deaths: %d  | Kills: %d", Adminlevel, money, score, deaths, kills);
 	SendClientMessage(playerid, COLOR_ORANGE, sString);
	return 1;
}
Here's the PlayerInfo enum:

Код:
enum PlayerInfo
{
    Pass[129], //User's password
    Adminlevel, //User's admin level
    Money, //User's money
    Score, //User's scores
    Kills, //User's kills
    Deaths //User's deaths
}
I am using Y_INI.
Reply
#2

o_O I was following a tutorial and this is what it said.. But thanks, I'll look into it further.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)