View Single Post
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 01-11-2020 , 07:16   Re: Return a Function
Reply With Quote #9

Ah, I didn't think about it, but now i know. So, will you change that? (because SourcePawn doesn't support unsigned data type and there may be conflicts or simple integer overflow, i think)

Also, i know private forwards can have multiple functions but how to use them in my case:

Code:
native int Store_RegItemBehavior(const char[] token, Handle plugin = null, ItemBehaviorCB onUse = INVALID_FUNCTION, ItemBehaviorCB onEquip = INVALID_FUNCTION, ItemBehaviorCB onUnequip = INVALID_FUNCTION, ItemBehaviorCB onTrade = INVALID_FUNCTION, ItemBehaviorCB onSell = INVALID_FUNCTION, ItemBehaviorCB onDrop = INVALID_FUNCTION);
So, you can pass INVALID_FUNCTION if you don't want it to execute.
How to store all these functions into forward if PrivateForward.AddFunction doesn't allow INVALID_FUNCTION.
Or i need to use 1 forward per function (multiple forwards)? (and instead of checking INVALID_FUNCTION, check null)
__________________

Last edited by MAGNAT2645; 01-11-2020 at 07:30.
MAGNAT2645 is offline