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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error 027: invalid character constant (/showthread.php?tid=206907)



error 027: invalid character constant - DeltaAirlines12 - 04.01.2011

Код:
C:\Users\Admin\Desktop\RPG\gamemodes\N_RPG.pwn(2168) : error 027: invalid character constant
C:\Users\Admin\Desktop\RPG\gamemodes\N_RPG.pwn(2168) : error 027: invalid character constant
C:\Users\Admin\Desktop\RPG\gamemodes\N_RPG.pwn(2170) : error 027: invalid character constant
C:\Users\Admin\Desktop\RPG\gamemodes\N_RPG.pwn(2170) : error 027: invalid character constant
C:\Users\Admin\Desktop\RPG\gamemodes\N_RPG.pwn(2174) : error 027: invalid character constant
C:\Users\Admin\Desktop\RPG\gamemodes\N_RPG.pwn(2174) : error 027: invalid character constant
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
And errors are on:

pawn Код:
public IRC_OnReceiveRaw(botid, message[])
{
    new File:file;
    if (!fexist("IRC\IRC_Log.txt"))
    {
        file = fopen("IRC\IRC_Log.txt", io_write);
    }
    else
    {
        file = fopen("IRC\IRC_Log.txt", io_append);
    }
    if (file)
    {
        fwrite(file, message);
        fwrite(file, "\r\n");
        fclose(file);
    }
    return 1;
}
Thanks


Re: error 027: invalid character constant - <Weponz> - 04.01.2011

ahh comment lines 2168 2170 and 2174..


Re: error 027: invalid character constant - DeltaAirlines12 - 04.01.2011

That stuff is there for a reason... it can't just be commented, I need this IRC stuff logged.


Re: error 027: invalid character constant - John_F - 04.01.2011

I think he means, specify which lines EXACTLY are the ones giving the compile errors, not comment out.


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

You need to escape the backslashes (with a backslash, isn't that ironic?) like this:

Код:
"IRC\\IRC_Log.txt"
Or use forward slashes, they tend to work as well.