Agneese-Saini / SA-MP

Apache License 2.0
66 stars 118 forks source link

fader.inc: infinite loop #50

Open updatewv opened 9 months ago

updatewv commented 9 months ago

'OnPlayerTextDrawFaded' is not called when defined and neither is the timer killed when the animation ends. There is an infinite loop (I debugged).

PlayerTextDrawFade(playerid, playertextdraw_0[playerid], 0x000000FF, 0x00000000, fade_type_box, 25, 5);

updatewv commented 9 months ago

if (_textDrawFader[playerid][idx][E_FADER_FROM_COLOR] == _textDrawFader[playerid][idx][E_FADER_TO_COLOR] && (_textDrawFader[playerid][idx][E_FADER_TYPE] == fade_type_text && _textDrawFader[playerid][idx][E_FADER_FROM_OUTLINE_COLOR] == _textDrawFader[playerid][idx][E_FADER_TO_OUTLINE_COLOR]))

the error could perhaps be in the '&&' operator, I changed it to '||' to be able to kill the timer, I haven't studied much how include works in general, and I don't even know if I'll need the 'fade_type_text', I did it in a hurry, so the repo owner could see this more calmly.