SA-MP Forums Archive
error 035: argument type mismatch (argument 3) - 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: error 035: argument type mismatch (argument 3) (/showthread.php?tid=359922)



error 035: argument type mismatch (argument 3) - kaiks - 15.07.2012

Please help me to get this line fixed.
pawn Код:
format(balance, sizeof(balance), COLOR_GREY, "You currently have $%d In your bank account."); PlayerInfo[playerid][pBankAccount];
Error:
Код:
error 035: argument type mismatch (argument 3)
warning 215: expression has no effect



Re: error 035: argument type mismatch (argument 3) - mkr - 15.07.2012

pawn Код:
format(balance, sizeof(balance), "You currently have $%d In your bank account.", PlayerInfo[playerid][pBankAccount]);
The third argument of format is the string that you're formatting, and the values that you want inserted into the string (in this case, the bank balance) go inside format().


Re: error 035: argument type mismatch (argument 3) - JustinAn - 15.07.2012

Quote:
Originally Posted by kaiks
Посмотреть сообщение
Please help me to get this line fixed.
pawn Код:
format(balance, sizeof(balance), COLOR_GREY, "You currently have $%d In your bank account."); PlayerInfo[playerid][pBankAccount];
Error:
Код:
error 035: argument type mismatch (argument 3)
warning 215: expression has no effect
Try this.
pawn Код:
new str[128];
format(str, sizeof(str), "You currently have $%d In your bank account.", PlayerInfo[playerid][pBankAccount]);
SendClientMessage(playerid, COLOR_GREY, str);



Re: error 035: argument type mismatch (argument 3) - kaiks - 15.07.2012

Thanks, i'm stupid.

edit: i know, both of your codes would work, i did the first one.
thanks anyway