#1

Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
   new INI:File = INI_Open("Users/%s.ini",(playerid));
   PlayerInfo[playerid][pLevel] = INI_ReadInt("level");
   PlayerInfo[playerid][pKills] = INI_ReadInt("kills");
   PlayerInfo[playerid][pDeaths] = INI_ReadInt("Deaths");

    INI_Close();

  new PName[MAX_PLAYER_NAME],strg [190];
 GetPlayerName(clickedplayerid, PName, sizeof (PName));
  format(strg,sizeof(strg),"{F81414} you are viewing {FFFFFF} %s stats \n {00CED1} Kills : {FFFFFF} %d \n {00CED1} Deaths : {FFFFFF} %d \n {00CED1} Level : {FFFFFF} %d  ",PName,pKills,pDeaths,pLevel);
  ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{00FF04}Player Stats",strg,"Close","Done");


    return 1;
}
Код:
D:\script\gamemodes\DeathMatchADD.pwn(454) : warning 202: number of arguments does not match definition
D:\script\gamemodes\DeathMatchADD.pwn(454) : warning 213: tag mismatch
D:\script\gamemodes\DeathMatchADD.pwn(454) : warning 204: symbol is assigned a value that is never used: "File"
Reply
#2

ini_open takes only one parameter which is the directory so remove the 'playerid' parameter you put there.
Reply
#3

The Rules & Guidelines of Scripting Help
Rule #5: Use a proper thread title, it should sum up the general problem you're having in a few words. (For example, do not use silly babble like "HELP PLS HELP PLS REP+++", use "Issue with SetPlayerPos and interiors")

For complete set of rules, visit
https://sampforum.blast.hk/showthread.php?tid=355296
Reply
#4

You don't need to open and read files again, when it already did it on loading and it stores the data onto the variables. Just use these variables on the format function and it will be ok.
Reply
#5

still giving symbol is assigned a value that is never used: "File" and tagg mistach
Reply
#6

As I said, it reads the data from the variables you stored them on ParseFile.
Delete these
pawn Код:
new INI:File = INI_Open("Users/%s.ini",(playerid));
   PlayerInfo[playerid][pLevel] = INI_ReadInt("level");
   PlayerInfo[playerid][pKills] = INI_ReadInt("kills");
   PlayerInfo[playerid][pDeaths] = INI_ReadInt("Deaths");

    INI_Close();
And use those variables.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)