Agneese-Saini/SA-MP

fader.inc: infinite loop

Opened this issue · 1 comments

'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);

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.