SA-MP Forums Archive
Format Problem - 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: Format Problem (/showthread.php?tid=526781)



Format Problem - acade - 19.07.2014

Hey, I'm having a problem with this line.

pawn Код:
format(string, sizeof(string), "{FF0000}Your account has been banned!{FFFFFF}\n\nBanned by:\t %s\nReason:\t %s\nBan Date:\t %s", INI_String(File, "BannedBy"), INI_String(File, "BanReason"), INI_String(File, "BanDate"));
Error:
Quote:

A1.pwn(436) : error 029: invalid expression, assumed zero
A1.pwn(436) : error 035: argument type mismatch (argument 1)
A1.pwn(436) : error 001: expected token: ";", but found "return"
A1.pwn(436) : fatal error 107: too many error messages on one line




Re: Format Problem - Battlezone - 19.07.2014

did you do this ?
pawn Код:
new string;
if so, change it to this ( because it's a string so you have to specify its length )
pawn Код:
new string[128];



Re: Format Problem - Segura - 19.07.2014

Add arrays to your 'string'.

pawn Код:
new string[128];



Re: Format Problem - acade - 19.07.2014

I've got that

pawn Код:
new string[128];
                    format(string, sizeof(string), "{FF0000}Your account has been banned!{FFFFFF}\n\nBanned by:\t %s\nReason:\t %s\nBan Date:\t %s", INI_String(File, "BannedBy"), INI_String(File, "BanReason"), INI_String(File, "BanDate"));
                    ShowPlayerDialog(playerid, BAN_DIALOG, DIALOG_STYLE_MSGBOX, " ", string, "OK", "");



Re: Format Problem - Arastair - 19.07.2014

Is your problem solved yet? if not pm me i'll tell you what to do just explain it completely