SA-MP Forums Archive
error 027: invalid character constant - 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 027: invalid character constant (/showthread.php?tid=306462)



error 027: invalid character constant - Face9000 - 26.12.2011

pawn Code:
format(stats, sizeof(stats), "Kills: %d\n\Deaths: %d\n\Money: %i$\n\Your IP: %s\n\Your Country: %s", GetPlayerScore(playerid), deaths[playerid], GetPlayerMoney(playerid),IP,GetPlayerCountryName(playerid));
Any help is appreciated,thanks.


Re: error 027: invalid character constant - spedico - 26.12.2011

Try this
pawn Code:
format(stats, sizeof(stats), "Kills: %i\n\Deaths: %i\n\Money: %i$\n\Your IP: %s\n\Your Country: %s", GetPlayerScore(playerid), deaths[playerid], GetPlayerMoney(playerid),IP,GetPlayerCountryName(playerid));
The problem is most likely in the \ symbols


Re: error 027: invalid character constant - Face9000 - 26.12.2011

Same


Re: error 027: invalid character constant - Vince - 26.12.2011

Replace
Code:
\n\
with
Code:
\n
Everywhere in your string.


Re: error 027: invalid character constant - Face9000 - 26.12.2011

Thanks!


Re: error 027: invalid character constant - FireCat - 26.12.2011

Try \n instead of \n\
Edit: Oh fouck it! -.-