[HELP] error 027: invalid character constant [+REP] - 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: [HELP] error 027: invalid character constant [+REP] (
/showthread.php?tid=589547)
[HELP] error 027: invalid character constant [+REP] -
GuthiX - 20.09.2015
Hello, Whenever I compile my gamemode, An error comes up and I don't know how to fix it:
ERROR:
Код:
C:\Program Files\CNR\pawno\include\cnr/cnr_commands.inc(4766) : error 027: invalid character constant
C:\Program Files\CNR\pawno\include\cnr/cnr_commands.inc(4766) : error 027: invalid character constant
Script:
pawn Код:
CMD:eventbank(playerid, params[])
{
if(!playerData[playerid][playerLoggedIn]) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"You must be logged in to use this command.");
new selection[10];
/*This is line 4766*/if(sscanf(params, "s[10]", selection)) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"{B7B7B7}Usage: {FFFFFF}/eventbank [BALANCE\HOST\DONATE]");
if(!strcmp(selection, "donate", true))
{
new amount, string[128];
if(sscanf(params, "i", amount)) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"{B7B7B7}Usage: {FFFFFF}/eventbank donate [amount]");
if(amount < 1000) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"You cannot donate less than $1,000.");
format(string, sizeof(string), ""WORD_SERVER"Thanks for donating $%s to the event bank, %s(%d).", FormatNumber(amount), GetName(playerid), playerid);
SendClientMessageToAll(COLOR_WHITE, string);
IncreaseEBBalance(amount);
}
if(!strcmp(selection, "host", true))
{
new string[128];
format(string, sizeof(string), ""WORD_SERVER"The event bank host is: %s", eventBank[host]);
SCM(playerid, COLOR_WHITE, string);
}
if(!strcmp(selection, "balance", true))
{
new string[128];
format(string, sizeof(string), ""WORD_SERVER"The event bank balance is: $%s", FormatNumber(eventBank[balance]));
SCM(playerid, COLOR_WHITE, string);
}
return 1;
}
Re: [HELP] error 027: invalid character constant [+REP] -
jlalt - 20.09.2015
try this:
PHP код:
CMD:eventbank(playerid, params[])
{
if(!playerData[playerid][playerLoggedIn]) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"You must be logged in to use this command.");
new selection;
if(sscanf(params, "s", selection)) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"{B7B7B7}Usage: {FFFFFF}/eventbank [BALANCE\HOST\DONATE]");
if(!strcmp(selection, "donate", true))
{
new amount, string[128];
if(sscanf(params, "i", amount)) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"{B7B7B7}Usage: {FFFFFF}/eventbank donate [amount]");
if(amount < 1000) return SCM(playerid, COLOR_WHITE, ""WORD_SERVER"You cannot donate less than $1,000.");
format(string, sizeof(string), ""WORD_SERVER"Thanks for donating $%s to the event bank, %s(%d).", FormatNumber(amount), GetName(playerid), playerid);
SendClientMessageToAll(COLOR_WHITE, string);
IncreaseEBBalance(amount);
}
if(!strcmp(selection, "host", true))
{
new string[128];
format(string, sizeof(string), ""WORD_SERVER"The event bank host is: %s", eventBank[host]);
SCM(playerid, COLOR_WHITE, string);
}
if(!strcmp(selection, "balance", true))
{
new string[128];
format(string, sizeof(string), ""WORD_SERVER"The event bank balance is: $%s", FormatNumber(eventBank[balance]));
SCM(playerid, COLOR_WHITE, string);
}
return 1;
}