SA-MP Forums Archive
Player write text where is \n and \t - 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: Player write text where is \n and \t (/showthread.php?tid=626559)



Player write text where is \n and \t - MerryDeer - 17.01.2017

Hi,

What if player write text where is \n and \t and then i write to database? is still remaining, when i load and show?


Re: Player write text where is \n and \t - Lordzy - 17.01.2017

They're escaped basically.


Re: Player write text where is \n and \t - Logic_ - 17.01.2017

Any way to unescape them?


Re: Player write text where is \n and \t - oMa37 - 17.01.2017

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Any way to unescape them?
I think using %s specifier would work.


Re: Player write text where is \n and \t - Vince - 17.01.2017

If a player types \n (or \t) (in a dialog or in the chat) it doesn't become a newline (or a tab) because they are two separate characters. If stored in the database as-is it will be read back as-is.