SA-MP Forums Archive
PlayerTextDrawSetString string with a space at the end - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: PlayerTextDrawSetString string with a space at the end (/showthread.php?tid=583933)



PlayerTextDrawSetString string with a space at the end - Unte99 - 01.08.2015

Some time ago I started creating this info box script, where I could use one function to display the text in an info box, and the text would be edited like so, that there would not be any cut words and there would be a limit to a one line length. At one time I gave up and did not know what was going on that the text would not show up in the info box (textdraws), but some would (the ones without a space at the end). I was debugging the whole script, tracking every move. The only lines that showed were the ones that did not have a space at the end. And the spaces were there, because the script was taking parts out of the whole text that was going to be used and putting them into separate lines. I would not have even imagined that a space at the end could cause this. So all in all:

Will work
Код:
PlayerTextDrawSetString(playerid, textdrawID, "I spent so much time on fixing this script!");
Will not work
Код:
PlayerTextDrawSetString(playerid, textdrawID, "I spent so much time on fixing this script! ");