nexquery / samp-textdraw-streamer

A simple plugin for sa-mp and open.mp to break the limits of textdrawings.
Apache License 2.0
33 stars 5 forks source link

[textdraw.streamer] DestroyDynamicPlayerTextDraw: No such id was found. (playerid: 0, textId: 0) (NOTIFIKASISYSTEM\SHOWITEMBOX.pwn:19) #20

Open VazenZ opened 6 months ago

VazenZ commented 6 months ago

how to fix that sir

nexquery commented 6 months ago

You are trying to make a transaction with a deleted id. Share line 19 from the SHOWITEMBOX.pwn file.

VazenZ commented 6 months ago

for(new i=-1;++i<10;) PlayerTextDrawDestroy(playerid, TextDrawItemBox[playerid][(IndexItemBox[playerid]*10)+i]);

nexquery commented 6 months ago

Your ID has an invalid value. Change the code as follows.

for(new i = -1; ++i < 10;)
{
    if(IsValidDynamicPlayerTextDraw(playerid, TextDrawItemBox[playerid][ (IndexItemBox[playerid] * 10) + i ]))
    {
        PlayerTextDrawDestroy(playerid, TextDrawItemBox[playerid][ (IndexItemBox[playerid] * 10) + i ]);
    }
}