[HELP] error 027: invalid character constant [+REP]
#1

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

try this:
PHP код:
CMD:eventbank(playeridparams[])
{
    if(!
playerData[playerid][playerLoggedIn]) return SCM(playeridCOLOR_WHITE""WORD_SERVER"You must be logged in to use this command.");

    new 
selection;
    if(
sscanf(params"s"selection)) return SCM(playeridCOLOR_WHITE""WORD_SERVER"{B7B7B7}Usage: {FFFFFF}/eventbank [BALANCE\HOST\DONATE]");

    if(!
strcmp(selection"donate"true))
    {
        new 
amountstring[128];
        if(
sscanf(params"i"amount)) return SCM(playeridCOLOR_WHITE""WORD_SERVER"{B7B7B7}Usage: {FFFFFF}/eventbank donate [amount]");
        if(
amount 1000) return SCM(playeridCOLOR_WHITE""WORD_SERVER"You cannot donate less than $1,000.");

        
format(stringsizeof(string), ""WORD_SERVER"Thanks for donating $%s to the event bank, %s(%d)."FormatNumber(amount), GetName(playerid), playerid);
        
SendClientMessageToAll(COLOR_WHITEstring);
        
IncreaseEBBalance(amount);
    }
    if(!
strcmp(selection"host"true))
    {
        new 
string[128];
        
format(stringsizeof(string), ""WORD_SERVER"The event bank host is: %s"eventBank[host]);
        
SCM(playeridCOLOR_WHITEstring);
    }
    if(!
strcmp(selection"balance"true))
    {
        new 
string[128];
        
format(stringsizeof(string), ""WORD_SERVER"The event bank balance is: $%s"FormatNumber(eventBank[balance]));
        
SCM(playeridCOLOR_WHITEstring);
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)