MySQL read \n
#1

Hey,

the text is loaded from MySQL and dont to line breaks



answers? :>
Reply
#2

\n means that you are adding two options to select.
Reply
#3

No, the text is loaded from MySQL and dont to line breaks

Reply
#4

Strange
Reply
#5

Can you show the coding?
Reply
#6

It's not the coding.
SA-MP don't break lines on mysql loaded strings (\n)
Reply
#7

It gets interpreted as a string, not as a linebreak. It's like if you would write \\n.
Reply
#8

How to fix it? :>
Reply
#9

replace "\\n" with "\n"
Reply
#10

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)