CMD:stats(playerid, params[]) { new sstr[300], sstr1[1000]; format(sstr, sizeof(sstr), "Money %d" GetPlayerMoney(playerid)); strcat(sstr1, sstr); format(sstr, sizeof(sstr), "Kills %d"); strcat(sstr1, sstr); format(sstr, sizeof(sstr), "Deaths %d"); strcat(sstr1, sstr); format(sstr, sizeof(sstr), "Credits %d"); strcat(sstr1, sstr); SPD(playerid, stats, DIALOG_STYLE_MSGBOX, "Stats", " sstr", "Close",""); return 1; }
C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : error 001: expected token: ";", but found ")" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : error 029: invalid expression, assumed zero C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : fatal error 107: too many error messages on one line
hello, i've been working on a stats command and I don't seem to be able to have Money nor anything to load
Код:
CMD:stats(playerid, params[]) { new sstr[300], sstr1[1000]; format(sstr, sizeof(sstr), "Money %d" GetPlayerMoney(playerid)); strcat(sstr1, sstr); format(sstr, sizeof(sstr), "Kills %d"); strcat(sstr1, sstr); format(sstr, sizeof(sstr), "Deaths %d"); strcat(sstr1, sstr); format(sstr, sizeof(sstr), "Credits %d"); strcat(sstr1, sstr); SPD(playerid, stats, DIALOG_STYLE_MSGBOX, "Stats", " sstr", "Close",""); return 1; } Код:
C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : error 001: expected token: ";", but found ")" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : error 029: invalid expression, assumed zero C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.4.pwn(537) : fatal error 107: too many error messages on one line |
expected token: "-string end-", but found "-identifier-"
format(sstr, sizeof(sstr), "Money %d" GetPlayerMoney(playerid));
format(sstr, sizeof(sstr), "Money %d", GetPlayerMoney(playerid));
CMD:stats(playerid, params[])
{
new sstr[300], sstr1[1000];
format(sstr, sizeof(sstr), "Money %d", GetPlayerCash(playerid));
strcat(sstr1, sstr);
format(sstr, sizeof(sstr), "Kills %d", pInfo[playerid][Kills]);
strcat(sstr1, sstr);
format(sstr, sizeof(sstr), "Deaths %d", pInfo[playerid][Deaths]);
strcat(sstr1, sstr);
format(sstr, sizeof(sstr), "Credits %d", pInfo[playerid][Credits]);
strcat(sstr1, sstr);
SPD(playerid, stats, DIALOG_STYLE_MSGBOX, "Stats", sstr , "Close","");
return 1;
}
CMD:stats(playerid, params[])
{
new sstr[300], sstr1[1000];
format(sstr, sizeof(sstr), "Money %d\n", GetPlayerCash(playerid));
strcat(sstr1, sstr);
format(sstr, sizeof(sstr), "Kills %d\n", pInfo[playerid][Kills]);
strcat(sstr1, sstr);
format(sstr, sizeof(sstr), "Deaths %d\n", pInfo[playerid][Deaths]);
strcat(sstr1, sstr);
format(sstr, sizeof(sstr), "Credits %d", pInfo[playerid][Credits]);
strcat(sstr1, sstr);
SPD(playerid, stats, DIALOG_STYLE_MSGBOX, "Stats", sstr , "Close","");
return 1;
}
new sstr1[50];
new sstr2[50];
new sstr3[50];
new sstr4[50];
new str[350]
format(sstr1, sizeof(sstr1), "Money %d\n", GetPlayerCash(playerid));
format(sstr2, sizeof(sstr2), "Credits %d", pInfo[playerid][Credits]);
format(sstr3, sizeof(sstr3), "Deaths %d\n", pInfo[playerid][Deaths]);
format(sstr4, sizeof(sstr4), "Kills %d\n", pInfo[playerid][Kills]);
strcat(str, sstr1);
strcat(str, sstr2);
strcat(str, sstr3);
strcat(str, sstr4);
SPD(playerid, stats, DIALOG_STYLE_MSGBOX, "Stats", str , "Close","");
format(sstr, sizeof(sstr), "Money %d\n", GetPlayerCash(playerid));
format(sstr, sizeof(sstr), "%sKills %d\n", sstr, pInfo[playerid][Kills]);
format(sstr, sizeof(sstr), "%sDeaths %d\n", sstr, pInfo[playerid][Deaths]);
format(sstr, sizeof(sstr), "%sCredits %d", sstr, pInfo[playerid][Credits]);