SA-MP Forums Archive
dialog error - 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: dialog error (/showthread.php?tid=291138)



dialog error - manchestera - 18.10.2011

Код:
#if defined USE_STATS
dcmd_stats(playerid,params[]) {
    new string[128], pDeaths, player1, h, m, s;
    if(!strlen(params)) player1 = playerid;
    else player1 = strval(params);

    if(IsPlayerConnected(player1)) {
        TotalGameTime(player1, h, m, s);
        if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
        format(string, sizeof(string), "| {FC0303}%s{00FF19}'s Stats \n{00FF19}Player Kills: {00FF19}Pistol: {00CEFC}%d \n{00FF19}Player Deaths: {00CEFC}%d \n{00FF19}Player Ratio: %0.2f \n{00FF19}Player Money: {00CEFC}$%d \n{00FF19}Player Time: \n{00CEFC}%d{FC0303}*{00FF19}hrs \n{00CEFC}%d{FC0303}*{00FF19}mins \n{00CEFC}%d{FC0303}*{00FF19}secs |",PlayerName2(player1), PlayerInfo[player1][Kills], PlayerInfo[playerid][SKILL_PISTOL], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
        return ShowPlayerDialog(playerid, 758, 0, "Player Stats", string, "Ok", "");
    } else return SendClientMessage(playerid, red, "Player Not Connected!");
}
Never done a dialog and ive just copied this from another post but ive tried to added more info but im getting one error

Код:
C:\Users\GTA ONLY\Desktop\codmw21\codmw2\filterscripts\ladmin4v2.pwn(4486) : error 075: input line too long (after substitutions)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: dialog error - SmiT - 18.10.2011

pawn Код:
#if defined USE_STATS
dcmd_stats(playerid,params[]) {
    new string[128], pDeaths, player1, h, m, s;
    if(!strlen(params)) player1 = playerid;
    else player1 = strval(params);

    if(IsPlayerConnected(player1)) {
        TotalGameTime(player1, h, m, s);
        if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
        format(string, sizeof(string), "| {FC0303}%s{00FF19}'s Stats \n
                                        {00FF19}Player Kills: {00FF19}Pistol: {00CEFC}%d \n
                                        {00FF19}Player Deaths: {00CEFC}%d \n{00FF19}Player Ratio: %0.2f \n
                                        {00FF19}Player Money: {00CEFC}$%d \n{00FF19}Player Time: \n
                                        {00CEFC}%d{FC0303}*{00FF19}hrs \n{00CEFC}%d{FC0303}*{00FF19}mins \n
                                        {00CEFC}%d{FC0303}*{00FF19}secs |"
,
                                        PlayerName2(player1),
                                        PlayerInfo[player1][Kills],
                                        PlayerInfo[playerid][SKILL_PISTOL],
                                        PlayerInfo[player1][Deaths],
                                        Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
                                       
        return ShowPlayerDialog(playerid, 758, 0, "Player Stats", string, "Ok", "");
    } else return SendClientMessage(playerid, red, "Player Not Connected!");
}



Re: dialog error - manchestera - 18.10.2011

could you explain what is wrong as i still need to add a few more weapons to it. And thanks

got some errors
Код:
C:\Users\GTA ONLY\Desktop\codmw21\codmw2\filterscripts\ladmin4v2.pwn(4487) : error 037: invalid string (possibly non-terminated string)
C:\Users\GTA ONLY\Desktop\codmw21\codmw2\filterscripts\ladmin4v2.pwn(4487) : error 029: invalid expression, assumed zero
C:\Users\GTA ONLY\Desktop\codmw21\codmw2\filterscripts\ladmin4v2.pwn(4487) : error 029: invalid expression, assumed zero
C:\Users\GTA ONLY\Desktop\codmw21\codmw2\filterscripts\ladmin4v2.pwn(4487) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
4 Errors.

it all works until i add in the pistol part