Textdraw string bug
#9

I've been having the same problem too, lately. It started happening after i cleaned up my code (removing spaces and indentations). I noticed that if i rearrange the code block where the textdraw is created, the problem shifts to the textdraw being created in it's place instead.

So let's say i have TD1 which is bugged, if i move the code where i'm creating TD1 below the code where i'm creating TD2, the problem shifts to TD2

Here i've attached images of before and after previews of the textdraw.


Relevant portions of the code
Код:
new Text:CMDTD0;
new Text:CMDTD1;

stock CMDTDs()
{
	CMDTD1 = TextDrawCreate(70.000000, 127.000000, "~g~Commands");
	TextDrawBackgroundColor(CMDTD1, 255);
	TextDrawFont(CMDTD1, 1);
	TextDrawLetterSize(CMDTD1, 0.500000, 1.000000);
	TextDrawColor(CMDTD1, -1);
	TextDrawSetOutline(CMDTD1, 1);
	TextDrawSetProportional(CMDTD1, 1);
	TextDrawSetShadow(CMDTD1, 1);

	CMDTD0 = TextDrawCreate(5.000000, 125.000000,
	"~n~~n~~n~  ~y~1- ~w~Basic Commands~n~  ~y~2- ~w~Animation Commands~n~  ~y~3- ~w~Teleport Commands~n~  ~y~4- ~w~Special Teleport Commands~n~  ~y~5- ~w~Item Commands~n~  ~y~6- ~w~Other Commands~n~~n~		Press ~y~LMB~w~ To Close The Box");
	TextDrawBackgroundColor(CMDTD0, 255);
	TextDrawFont(CMDTD0, 1);
	TextDrawLetterSize(CMDTD0, 0.289999, 0.899999);
	TextDrawColor(CMDTD0, -1);
	TextDrawSetOutline(CMDTD0, 1);
	TextDrawSetProportional(CMDTD0, 1);
	TextDrawUseBox(CMDTD0, 1);
	TextDrawBoxColor(CMDTD0, 110);
	TextDrawTextSize(CMDTD0, 227.000000, 49.000000);
}
public OnGameModeInit()
{
CMDTDs();
}
EDIT: I was able to fix this issue out by cleaning my code. Just did some proper initialization for the textdraws and made sure i called them in the right function. Thanks to Kylesmith for the help.
Reply


Messages In This Thread
Textdraw string bug - by Richie - 23.09.2011, 17:19
Re: Textdraw string bug - by Richie - 23.09.2011, 23:06
Re: Textdraw string bug - by Gamer_Z - 24.09.2011, 00:50
Re: Textdraw string bug - by cyber_punk - 24.09.2011, 01:28
Re: Textdraw string bug - by Gamer_Z - 24.09.2011, 04:44
Re: Textdraw string bug - by Richie - 24.09.2011, 09:36
Re: Textdraw string bug - by cyber_punk - 24.09.2011, 17:47
Re: Textdraw string bug - by Gamer_Z - 24.09.2011, 18:11
Re: Textdraw string bug - by Zenonz - 31.07.2017, 15:11

Forum Jump:


Users browsing this thread: 3 Guest(s)