Escaping slashes


I see if i escape Backslash (\) i get 2 \\ and more more time player get saved it's get doubled slashes

Maybe possible when loading disable slashes what i have escaped?

Does the \\ appear in the saved file? If yes you're doing something wrong.

You only have to escape them when you actually type it in a string or as a single character (like '\\') in your script.
If you load a "\" from a text file for example (or a player writes a backslash in a dialog), it is already escaped.

If I got your question wrong, please explain it a bit more.

Yes \\ apear not \\ i see like that

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\

When player disconnect i save everytime info like all peoples safe, and i safe messages (PM) i use escape everytime before use mysql query to safe and when connect i load.

Other question if can i escape a lot of times in a sec. ?

Oh I thought you were working with files.

Whats your exact query to set the text containing a backslash?

Usually the backslash has to be escaped for a query in cleartext, so if you write the backslash in PAWN you have to make it \\\\. If you already have a backslash in a text you have to insert another \ ("\\" in PAWN). But I don't know if mysql_escape_* already does this, if yes don't escape twice.

You can also un-escape it everytime you load a string containing double backslash using for and strdel.

But I'm not very pro at MySQL, so you might want to wait for someone else to give their opinion or ****** it (it has been asked like a hundred times on stackoverflow with good solutions).

Yes i too think that i need delete half of this "\" with strdel

There should be a way without doing this though, seems more like a workaround.
You can try NO_BACKSLASH_ESCAPES SQL or changing the queries.

Forum Jump:

Users browsing this thread: 1 Guest(s)