SA-MP Forums Archive
String problem with textdraw - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: String problem with textdraw (/showthread.php?tid=272732)



[SOLVED] String problem with textdraw - iPLEOMAX - 29.07.2011

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?


Re: String problem with textdraw - WoodPecker - 29.07.2011

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


Re: String problem with textdraw - iPLEOMAX - 29.07.2011

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 \


Re: String problem with textdraw - Snipa - 29.07.2011

Edit: nvm


Re: String problem with textdraw - Mean - 29.07.2011

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


Re: String problem with textdraw - iPLEOMAX - 29.07.2011

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