Help me please
#1

Errors:
Код:
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : warning 215: expression has no effect
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : error 001: expected token: ";", but found "]"
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : error 029: invalid expression, assumed zero
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : fatal error 107: too many error messages on one line
And the line 610:

Код:
CMD:vipgoto(playerid, params[])
{
	{
	if(PlayerInfo[Level] == 1) //- 610 line
	    SendClientMessage(playerid, COLOR_GREEN, "TEST");
	} else {
	if(PlayerInfo[Level] == 2)
	    SendClientMessage(playerid, COLOR_GREEN, "TEST");
 	}
 	return 1;
}
Reply
#2

pawn Код:
CMD:vipgoto(playerid, params[])
{
    {
    if(PlayerInfo[playerid][Level] == 1) //- 610 line
        SendClientMessage(playerid, COLOR_GREEN, "TEST");
    } else {
    if(PlayerInfo[playerid][Level] == 2)
        SendClientMessage(playerid, COLOR_GREEN, "TEST");
    }
    return 1;
}
Reply
#3

Now i have this error:

Код:
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : warning 215: expression has no effect
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : error 001: expected token: ";", but found "]"
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : error 029: invalid expression, assumed zero
D:\server\King Of Stunt\filterscripts\xVIP.pwn(610) : fatal error 107: too many error messages on one line
Reply
#4

please post how you declared PlayerInfo and also post your enum
Reply
#5

Код:
enum PlayerInfo
{
	Level,
	AccNum,
	#if SaveKillsDeaths == true
	Kills,
	Deaths,
	#endif
	#if SaveMoneyScore == true
	Score,
	Money,
	#endif
	#if SaveWeapons == true
	Weapon1,
	Weapon1Ammo,
	Weapon2,
	Weapon2Ammo,
	Weapon3,
	Weapon3Ammo,
	Weapon4,
	Weapon4Ammo,
	Weapon5,
	Weapon5Ammo,
	Weapon6,
	Weapon6Ammo
	#endif
}
Код:
new PlayerData[MAX_PLAYERS][PlayerInfo];
Reply
#6

pawn Код:
CMD:vipgoto(playerid, params[])
{
    if(PlayerData[playerid][Level] == 1)
    {
        SendClientMessage(playerid, COLOR_GREEN, "TEST");
    }
    if(PlayerData[playerid][Level] == 2)
    {
        SendClientMessage(playerid, COLOR_GREEN, "TEST");
    }
    return 1;
}
Reply
#7

pawn Код:
CMD:vipgoto(playerid, params[])
{
    if(PlayerInfo[Level] == 1)
    {
        SendClientMessage(playerid, COLOR_GREEN, "TEST");
    }
    else if(PlayerInfo[Level] == 2)
    {
        SendClientMessage(playerid, COLOR_GREEN, "TEST");
    }
    return 1;
}
Reply
#8

Change these 2 things, you have to use your variables, not the name of your enum:

pawn Код:
if(PlayerData[playerid][Level] == 1)
and

pawn Код:
else if(PlayerData[playerid][Level] == 2)
Reply
#9

Twisted_Insane, Thanks!~
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)