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



Invalid character constant - AndreiWow - 18.02.2017

PHP код:
mysql_format(DatabaseDB_Querysizeof(DB_Query), "INSERT INTO `DrugInventory` (`PlayerID`)\VALUES (%d)"PlayerInfo[playerid][ID]);
         
mysql_tquery(DatabaseDB_Query); 
PHP код:
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(2957) : error 027invalid character constant
C
:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(2957) : error 027invalid character constant
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Errors




Re: Invalid character constant - AndreiWow - 18.02.2017

Solved...
PHP код:
mysql_format(DatabaseDB_Querysizeof(DB_Query), "INSERT INTO `DrugInventory` (`PlayerID`)\
        VALUES (%d)"
PlayerInfo[playerid][ID]); 
It was due to

\VALUES
I wrote it on a new line and it worked


Re: Invalid character constant - GoldenLion - 18.02.2017

What you could also do was removing the \.