SA-MP Forums Archive
Backslash as character - 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: Backslash as character (/showthread.php?tid=523411)



Backslash as character - icra - 02.07.2014

Hello people.
I'm posting there since i've got a problem with backslash characters.

If i do for example:
pawn Код:
print("\ yo /");
This won't work since \ is looking for another character to execute a command.
For example, \n or \0.

Is there a way to print "\" and let it result as a character?
I looked up on the forum, but i didn't find anything.

Thank you,
icra


Re: Backslash as character - Dignity - 02.07.2014

Use "\\" instead of "\" to print a backslash into a string.
Source: https://sampwiki.blast.hk/wiki/Scripting...cape_character


Re: Backslash as character - icra - 02.07.2014

Thank you, i didn't see as well the wiki!
Increasing your reputation