error 001: expected token: ",", but found ";"
#1

I have this error while compiled, please help

pawn Код:
//error 001: expected token: ",", but found ";"

the line
    format(string, sizeof(string), "{228B22}[ {FFFFFF} ID: %d {228B22}] {228B22}[ {FFFFFF} Name: %s {228B22}] {228B22}[ {FFFFFF}Total Money: $%d {228B22}]", Slot1, GetName(Slot1), number_format(PlayerInfo[playerid][bank]+(PlayerTemp[playerid][sm]));
Reply
#2

try this

pawn Код:
format(string, sizeof(string), "{228B22}[ {FFFFFF} ID: %d {228B22}] {228B22}[ {FFFFFF} Name: %s {228B22}] {228B22}[ {FFFFFF}Total Money: $%d {228B22}]", Slot1, GetName(Slot1), number_format(PlayerInfo[playerid][bank] + PlayerTemp[playerid][sm]));
Reply
#3

Add another closing bracket at the end.
Reply
#4

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
try this

pawn Код:
format(string, sizeof(string), "{228B22}[ {FFFFFF} ID: %d {228B22}] {228B22}[ {FFFFFF} Name: %s {228B22}] {228B22}[ {FFFFFF}Total Money: $%d {228B22}]", Slot1, GetName(Slot1), number_format(PlayerInfo[playerid][bank] + PlayerTemp[playerid][sm]));
Not works
Reply
#5

Код:
format(string, sizeof(string), "{228B22}[ {FFFFFF} ID: %d {228B22}] {228B22}[ {FFFFFF} Name: %s {228B22}] {228B22}[ {FFFFFF}Total Money: $%d {228B22}]", Slot1, GetName(Slot1), number_format(PlayerInfo[playerid][bank] + PlayerTemp[playerid][sm])));
Reply
#6

Quote:
Originally Posted by Adamss
Посмотреть сообщение
Add another closing bracket at the end.
Код:
format(string, sizeof(string), "{228B22}[ {FFFFFF} ID: %d {228B22}] {228B22}[ {FFFFFF} Name: %s {228B22}] {228B22}[ {FFFFFF}Total Money: $%d {228B22}]", Slot1, GetName(Slot1), number_format(PlayerInfo[playerid][bank]+(PlayerTemp[playerid][sm])));
Reply
#7

Adamss - It's worked in compiled, but it's doesn't work in the game
Reply
#8

I recommend you to not do collection/multiplication inside a format, do it outside then save it in a variable and show that variable, it'll be easier.

Edit:
What doesn't work ingame? it doesn't show the message?
Reply
#9

It show ingame

For example:-

pawn Код:
Without bugs - ..... Total Money: $32,235,234
With Bugs - .......... Total Money: $50 (it's always show $50)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)