String problem with textdraw
#1

Ok guys, I created a new textdraw, here:

pawn Код:
TDAF[3] = TextDrawCreate(471.000000, 241.000000, "\");
but due to the character "\" i get these errors:
Код:
C:\***\gamemodes\***.pwn(895) : error 037: invalid string (possibly non-terminated string)
C:\***\gamemodes\***.pwn(895) : warning 215: expression has no effect
C:\***\gamemodes\***.pwn(895) : error 001: expected token: ";", but found ")"
C:\***\gamemodes\***.pwn(895) : error 029: invalid expression, assumed zero
C:\***\gamemodes\***.pwn(895) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Is there a way i could have my string the way i want without any errors?
Reply
#2

Here you can learn about TextDraws https://sampwiki.blast.hk/wiki/TextDrawCreate
Reply
#3

Quote:
Originally Posted by WoodPecker
Посмотреть сообщение
Here you can learn about TextDraws https://sampwiki.blast.hk/wiki/TextDrawCreate
Ahem, you could have atleast read the problem correctly... :/

If i use this character: "\", the code will 'try' to continue the string in the next line. But I don't want this to happen.
I want the textdraw string to be \
Reply
#4

Edit: nvm
Reply
#5

Using double backslash (\\) will solve this problem. I don't know why you would want a textdraw showing only "\" though.
Reply
#6

Quote:
Originally Posted by Mean
Посмотреть сообщение
Using double backslash (\\) will solve this problem. I don't know why you would want a textdraw showing only "\" though.
Umm, "\\" gave me errors but i added an underscore "\\_" and now it works. Thanks MeaniePie. ^^
I'll pm you why i want this.. :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)