client crash
#1

Код:
    format(string, sizeof(string), "~y~Bombs: ~g~%i", bombcount);
    format(ProductList, sizeof(ProductList), "%s ~n~To refresh timer, type /mybombs again!", ProductList);
    Info_ShowForPlayer(playerid, 1, string, ProductList);
It crashes if i use 250 characters. Info_ShowForPlayer is a textdraw box, and according to the limits you can show more than 250. So why does it crash?

full command

pawn Код:
COMMAND:mybombs(playerid)
{
    new bombcount;
    new Status[16];
   
    ProductList = "";
   
    foreach(Bomb, b)
    {
      if(BombInfo[b][BombOwner] == AccountData[playerid][characterID])
      {

        bombcount ++;
        if(BombInfo[b][BombStatus] == 1) { format(Status, 15, "~g~Ready"); }
        if(BombInfo[b][BombStatus] == 2) { format(Status, 15, "~r~Detonating.."); }
       
        format(ProductList, sizeof(ProductList), "%s~w~Bomb ~g~ID:%i~w~ Timer:~r~%i~w~ Status: %s~n~", ProductList, b, BombInfo[b][BombTime], Status );
      }
    }
   
    if(bombcount == 0)
    {
        Info_ShowForPlayer(playerid, 1, "No bombs", "You haven't planted any bombs");
        return 1;
    }
   
    format(string, sizeof(string), "~y~Bombs: ~g~%i", bombcount);
    format(ProductList, sizeof(ProductList), "%s ~n~To refresh timer, type /mybombs again!", ProductList);
    Info_ShowForPlayer(playerid, 1, string, ProductList);
   
    return 1;
}
Reply
#2

bump......
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)