Help me please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me please (
/showthread.php?tid=324341)
Help me please -
[sFx]BlueSmoke - 09.03.2012
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;
}
Re: Help me please -
eesh - 09.03.2012
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;
}
Re: Help me please -
[sFx]BlueSmoke - 09.03.2012
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
Re: Help me please -
eesh - 09.03.2012
please post how you declared PlayerInfo and also post your enum
Re: Help me please -
[sFx]BlueSmoke - 09.03.2012
Код:
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];
Re: Help me please -
eesh - 09.03.2012
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;
}
Re: Help me please -
V_LOPE - 09.03.2012
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;
}
Re: Help me please -
Twisted_Insane - 09.03.2012
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)
Re: Help me please -
[sFx]BlueSmoke - 09.03.2012
Twisted_Insane, Thanks!~