Mini Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Mini Help (
/showthread.php?tid=627369)
Mini Help -
KokyZ - 27.01.2017
hey all i have just scripted a simple script for my server but after compiling it i found a error and i have tried serveral times to fix it but i can't please help.
Code:
new symbols[20][] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '+', '=', '~', '`', '/', '\', '.', '|', '?'};
error:
Code:
error 027: invalid character constant
Re: Mini Help -
SyS - 27.01.2017
You can't use \ just like that use \\ also no need of 2d array its just plane set of characters.Use this
PHP Code:
new symbols[]= {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '+', '=', '~', '`', '/', '\\', '.', '|', '?'};
Re: Mini Help -
KokyZ - 27.01.2017
Quote:
Originally Posted by Sreyas
You can't use \ just like that use \\ also no need of 2d array its just plane set of characters.Use this
PHP Code:
new symbols[]= {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '+', '=', '~', '`', '/', '\\', '.', '|', '?'};
|
thanks dude for your help but i have one question why should i use \\ not \
?
Re: Mini Help -
SyS - 27.01.2017
Because it is escape sequence which are used to represent special characters in strings and character literals.To represent \ we should ,therefore, use \\
Re: Mini Help -
KokyZ - 27.01.2017
Quote:
Originally Posted by Sreyas
Because it is escape sequence which are used to represent special characters in strings and character literals.To represent \ we should ,therefore, use \\
|
okay thanks so much
+repped