Why doesn't this textdraw work?
#1

I haven't been using textdraws for quite a while but I actually had never problems with them. But today I created one with Zamaroht's Text Draw Editor (v.1.0) and got a weird problem.

Here is a part of my code:

Код:
new Text:Windowtext;

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

public OnGameModeInit()
{
	Windowtext = TextDrawCreate(179.000000, 143.000000, "");
	TextDrawBackgroundColor(Windowtext, 255);
	TextDrawFont(Windowtext, 1);
	TextDrawLetterSize(Windowtext, 0.500000, 1.000000);
	TextDrawColor(Windowtext, 0xFFFFFFFF);
	TextDrawSetOutline(Windowtext, 0);
	TextDrawSetProportional(Windowtext, 1);
	TextDrawSetShadow(Windowtext, 1);
	TextDrawUseBox(Windowtext, 1);
	TextDrawBoxColor(Windowtext, 0x00000044);
	TextDrawTextSize(Windowtext, 488.000000, 0.000000);
	
	AddPlayerClass(0,0.0,0.0,5.0,0.0,0,0,0,0,0,0);
	return 1;
}
The red marked part is making me problems. If I implent it in my code, the samp-server.exe shuts itself down after some seconds. The log file doesn't give me any informations. If I do not implent it, everything works fine.

Compiling works in both cases without any errors or warnings.


Side Informations:

• My SA:MP version is: 0.3c
• My SA:MP Server version is: 0.3c R5, Windows
Reply
#2

It's because when you created it, you gave it an empty string. Put something like a space in there to fix it.

pawn Код:
//change
Windowtext = TextDrawCreate(179.000000, 143.000000, "");

//to
Windowtext = TextDrawCreate(179.000000, 143.000000, " ");
Reply
#3

Quote:
Originally Posted by Backwardsman97
Посмотреть сообщение
It's because when you created it, you gave it an empty string. Put something like a space in there to fix it.
Oh I thought that would work [Wanted to set the string later with a function]. But ok my bad, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)