[Tool/Web/Other] [NOT FOR NEWBIE] all callback hooks reference
#3

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
You aren't handling returns in those hooked callbacks. This will output warnings if used in includes.

pawn Код:
public OnObjectMoved(objectid) {
    #if defined mylib_OnObjectMoved
        mylib_OnObjectMoved(objectid);
    #endif
}
Should be:

pawn Код:
public OnObjectMoved(objectid)
{
    #if defined mylib_OnObjectMoved
        return mylib_OnObjectMoved(objectid);
    #else
        return 1;
    #endif
}
Thank you and I have fixed it.
I add some return for callbacks which need a return handle.
Reply


Messages In This Thread
[NOT FOR NEWBIE] callback hooks reference - by iLuXing - 05.03.2016, 00:49
Re: [NOT FOR NEWBIE] all callback hooks reference - by Emmet_ - 05.03.2016, 00:52
Re: [NOT FOR NEWBIE] all callback hooks reference - by iLuXing - 05.03.2016, 01:20
Re: [NOT FOR NEWBIE] all callback hooks reference - by Crayder - 05.03.2016, 02:02
Re: [NOT FOR NEWBIE] all callback hooks reference - by OstGot - 05.03.2016, 12:10
Re: [NOT FOR NEWBIE] all callback hooks reference - by Crayder - 05.03.2016, 15:59
Re: [NOT FOR NEWBIE] all callback hooks reference - by Slice - 08.03.2016, 08:46

Forum Jump:


Users browsing this thread: 2 Guest(s)