SA-MP Forums Archive
error 001: expected token: ",", but found ";" - 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 001: expected token: ",", but found ";" (/showthread.php?tid=529439)



error 001: expected token: ",", but found ";" - ajam123 - 02.08.2014

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]));



Re: error 001: expected token: ",", but found ";" - IceBilizard - 02.08.2014

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]));



Re: error 001: expected token: ",", but found ";" - Adamss - 02.08.2014

Add another closing bracket at the end.


Re: error 001: expected token: ",", but found ";" - ajam123 - 02.08.2014

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


Re: error 001: expected token: ",", but found ";" - McBan - 02.08.2014

Код:
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])));



Re: error 001: expected token: ",", but found ";" - Adamss - 02.08.2014

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])));



Re: error 001: expected token: ",", but found ";" - ajam123 - 02.08.2014

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


Re: error 001: expected token: ",", but found ";" - Beckett - 02.08.2014

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?


Re: error 001: expected token: ",", but found ";" - ajam123 - 02.08.2014

It show ingame

For example:-

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