MySQL read \n - 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: MySQL read \n (
/showthread.php?tid=291322)
MySQL read \n -
Siedler - 19.10.2011
Hey,
the text is loaded from MySQL and dont to line breaks
answers? :>
Re: MySQL read \n -
nilanjay - 19.10.2011
\n means that you are adding two options to select.
AW: MySQL read \n -
Siedler - 19.10.2011
No, the text is loaded from MySQL and dont to line breaks
Re: MySQL read \n -
nilanjay - 19.10.2011
Strange
Re: MySQL read \n -
nilanjay - 19.10.2011
Can you show the coding?
AW: MySQL read \n -
Siedler - 19.10.2011
It's not the coding.
SA-MP don't break lines on mysql loaded strings (\n)
Re: MySQL read \n -
Sinner - 19.10.2011
It gets interpreted as a string, not as a linebreak. It's like if you would write \\n.
AW: MySQL read \n -
Siedler - 24.10.2011
How to fix it? :>
AW: MySQL read \n -
Meta - 24.10.2011
replace "\\n" with "\n"
Re: MySQL read \n -
[NoV]LaZ - 24.10.2011
https://sampforum.blast.hk/showthread.php?tid=270547
See ******' post.
A working example of Grim_'s code would be:
pawn Код:
stock NewLine(str[])
{
for (new i = 0; i < strlen(str); i++)
{
if (str[i] == '//') {
if (str[i + i] == 'n') {
strdel(str, i, i + 2);
strins(str, "\n", i, sizeof (str));
}
}
}
return 1;
}