Textdraw string "\"
#1

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?
Reply
#2

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

deleted..
Reply
#4

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.
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)