error 035: argument type mismatch (argument 3)
#1

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
Reply
#2

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().
Reply
#3

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);
Reply
#4

Thanks, i'm stupid.

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


Forum Jump:


Users browsing this thread: 1 Guest(s)