/stats dialog doesn't work
#1

Hello im trying to create a /stats dialog but its not working and getting a warning:

PHP код:
(3595) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Warning



Command:
PHP код:
CMD:stats(playeridparams[])
{
    new 
string[128];
    
SendClientMessageEx(playeridTeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________");
    
format(stringsizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d"pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
    
SendClientMessageEx(playeridCOLOR_WHITEstring);
    
SendClientMessageEx(playeridTeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________");
    
ShowPlayerDialog(playerid,DIALOG_STATSDIALOG_STYLE_MSGBOX"Stats Test","Close""");
    return 
1;

Reply
#2

The problem is with your dialog.

Код:
CMD:stats(playerid, params[]) 
{ 
    new string[128]; 
    SendClientMessageEx(playerid, TeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________"); 
    format(string, sizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]); 
    SendClientMessageEx(playerid, COLOR_WHITE, string); 
    SendClientMessageEx(playerid, TeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________"); 
    ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats Test", string,"Close", ""); 
    return 1; 
}
Reply
#3

it is working now but i got it in the chat aswel

http://gyazo.com/57b93e22a271aad409a6c921dda29e80
Reply
#4

Try with this:
Код:
CMD:stats(playerid, params[]) 
{ 
    new string[128]; 
    format(string, sizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]); 
    ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats Test", string,"Close", ""); 
    return 1; 
}
Reply
#5

Код:
CMD:stats(playerid, params[]) 
{ 
    new string[128]; 
    format(string, sizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]); 
    ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats Test", string,"Close", ""); 
    return 1; 
}
Should work perfectly.
Reply
#6

with \n more better
PHP код:
format(stringsizeof(string), "Name: %s \n Score: %d \n Kills: %d \n Deaths: %d"pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]); 
Reply
#7

That isn't what he asked for though.
Reply
#8

Thanks guys that was my next thing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)