SA-MP Forums Archive
Textdraw crashing server - 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: Textdraw crashing server (/showthread.php?tid=119278)



Textdraw crashing server - armyoftwo - 07.01.2010

ongamemodeinit
Код:
	Textdraw4 = TextDrawCreate(314.000000, 437.000000, "");
	TextDrawBackgroundColor(Textdraw4, 255);
	TextDrawFont(Textdraw4, 1);
	TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
	TextDrawColor(Textdraw4, -1);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawSetProportional(Textdraw4, 1);
onplayerspawn
Код:
	new scores[128];
 	format(scores, sizeof(scores), "Rank:[%s]",RankInfo[playerid][RName]);
 	TextDrawSetString(Textdraw4, scores);
 	TextDrawShowForPlayer(playerid, Textdraw4);
It crashes my server when i turn it on...


Re: Textdraw crashing server - Norck - 07.01.2010

Dude,
Quote:
Important Note: text[] must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
Try
Код:
 Textdraw4 = TextDrawCreate(314.000000, 437.000000, " ");
	TextDrawBackgroundColor(Textdraw4, 255);
	TextDrawFont(Textdraw4, 1);
	TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
	TextDrawColor(Textdraw4, -1);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawSetProportional(Textdraw4, 1);



Re: Textdraw crashing server - armyoftwo - 07.01.2010

Quote:
Originally Posted by Sinyavski
Dude,
Quote:
Important Note: text[] must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
Try
Код:
 Textdraw4 = TextDrawCreate(314.000000, 437.000000, " ");
	TextDrawBackgroundColor(Textdraw4, 255);
	TextDrawFont(Textdraw4, 1);
	TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
	TextDrawColor(Textdraw4, -1);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawSetProportional(Textdraw4, 1);
oh that was stupid of me...
Thanks.