Stats - 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: Stats (
/showthread.php?tid=416417)
Stats -
DerickClark - 17.02.2013
i got errors plz help me
Код:
(7875) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
(7875) : warning 215: expression has no effect
(7875) : error 001: expected token: ";", but found "]"
(7875) : error 029: invalid expression, assumed zero
(7875) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Код:
CMD:stats(playerid, params[])
{
new RobSkill = PlayerInfo[playerid][RobSkill];
new ArmyPermission = PlayerInfo[playerid][ArmyPermission];
new Score = PlayerInfo[playerid][Score];
new string[256], sendername[MAX_PLAYER_NAME];
format(string,sizeof(string), "PlayerName:( %s ) Admin Level:[ %d ] Kills:[ %d ] Deaths:[ %d ] ArmyPermissions:%d",sendername,Score,ArmyPermissions,RobSkill);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX , "Stats", string, "Close", "");
return 1;
}
Re: Stats -
]Rafaellos[ - 17.02.2013
Why dont use it like this?
pawn Код:
CMD:stats(playerid, params[])
{
new string[256], sendername[MAX_PLAYER_NAME];
GetPlayerName(sendername, sizeof(sendername));
format(string,sizeof(string), "PlayerName:( %s ) Admin Level:[ %d ] Kills:[ %d ] Deaths:[ %d ] ArmyPermissions:%d",sendername,GetPlayerScore(playerid),PlayerInfo[playerid][ArmyPermission],PlayerInfo[playerid][RobSkill]);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX , "Stats", string, "Close", "");
return 1;
}
+ I think you messed up the format due to in AdminLevel will print the score, in Kills will print Army permissions and in Deaths will print the RobSkill.
Re: Stats -
DerickClark - 17.02.2013
Код:
(7876) : error 035: argument type mismatch (argument 1)
(7876) : error 035: argument type mismatch (argument 2)
(7877) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
(7877) : warning 215: expression has no effect
(7877) : error 001: expected token: ";", but found "]"
(7877) : error 029: invalid expression, assumed zero
(7877) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
Re: Stats -
]Rafaellos[ - 17.02.2013
Show us all the script.
Re: Stats -
DerickClark - 17.02.2013
Here:
http://forum.sa-mp.com/showthread.ph...s+Cops+Robbers
Re: Stats -
DerickClark - 17.02.2013
Any help?