Esceping Backslashes - 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: Esceping Backslashes (
/showthread.php?tid=302053)
Esceping Backslashes -
Dodus - 07.12.2011
Hello, how i can escepe backslashes from string? I have a lot of dialogs type inputtext, and i want to escaping backslashes: "\". I can't do it with normal replace text's, compilator shows to me errors when i want.
Re: Esceping Backslashes -
MP2 - 07.12.2011
To insert a backslash into a string, enter two, example:
Re: Esceping Backslashes -
Dodus - 07.12.2011
@up. doesnt's work:
pawn Код:
stock EscapeBackslashes(givenString[])
{
new pos, editingString[64];
memcpy(editingString, givenString, 0, 64 * 4);
pos = strfind(editingString, "\\", true);
while(pos != -1)
{
strdel(editingString, pos, pos + 1);
pos = strfind(editingString, "\\", true, pos + 1);
}
return editingString;
}
And this not delete a backslashes from strings.