Backslash as character
#1

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)