SA-MP Forums Archive
Textdraw string "\" - 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: Textdraw string "\" (/showthread.php?tid=564973)



Textdraw string "\" - De4dpOol - 24.02.2015

Hello, today i was creating a textdraw and I got the following error:

pawn Код:
test.pwn(6902) : error 037: invalid string (possibly non-terminated string)
test.pwn(6902) : warning 215: expression has no effect
test.pwn(6902) : error 001: expected token: ";", but found ")"
test.pwn(6902) : error 029: invalid expression, assumed zero
test.pwn(6902) : fatal error 107: too many error messages on one line
The line is:

pawn Код:
new Textdraw[14];//I have 14 textdraws
Textdraw[0] = TextDrawCreate(45.000000, 298.000000, "\");
When I remove the "\" it compiles fine. But I want to use it in textdraw. It worked in textdraw editor but not working in script. Any idea to fix it?


Re: Textdraw string "\" - Vince - 24.02.2015

The backslash is the default escape character. To insert a literal backslash escape it with another backslash "\\".


Re: Textdraw string "\" - Golf - 24.02.2015

deleted..


Re: Textdraw string "\" - De4dpOol - 24.02.2015

Quote:
Originally Posted by Vince
Посмотреть сообщение
The backslash is the default escape character. To insert a literal backslash escape it with another backslash "\\".
Thank you +rep.


Re: Textdraw string "\" - Ritzy2K - 24.02.2015

the thing vince said i came across it first time.... thanks for that man...

but if i myswlf normally want to insert a blackslash in a textdraw i do " /" i gave a space....it works for me tho.