08.03.2013, 06:49
(
Последний раз редактировалось RajatPawar; 08.03.2013 в 07:38.
)
Hello ! I made a text draw system for myself, with custom stocks - CreateTextBoxForPlayer and I want to add "\n" to the given string when I want to bring the textdraw to the next line. But for that, I gotta check the strlen, which I am doing using this:
So whenever I remove the ""//Problem's here !"" lines, it works, but ofcourse, the string goes out of the td box I have made. Any help?
pawn Код:
stock ShowTextInfoBoxToPlayer(playerid, title[], titlecolor, string[])
{
TextDrawSetString(Textdraw1, title);
#define strl strlen(string)//Problem's here !
#if (20 > strl) //Problem's here !
strins(string, "\n", 20); //Problem's here !
#endif //Problem's here !
TextDrawColor(Textdraw1, titlecolor);
TextDrawSetString(Textdraw3, string);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
return 1;
}