View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-01-2016 , 15:28   Re: Methodmaps on global variables
Reply With Quote #8

Judging from the error you're seeing, g_hMenuDataPack[iClient] is null when you're trying to call Reset on it. Which would happen if you called func2 for a client before calling func1 for a client.

Quote:
Originally Posted by Merudo View Post
Looks like a compiler bug to me.

g_hMenuDataPack[iClient].Reset() should return "error 092: number of arguments does not match definition", or .Reset() should have "false" as default argument.
false is the default for Reset. In fact, the DataPack MethodMap tells Reset to use the ResetPack function rather than having its own implementation. Or at least that's what SourceMod 1.7 does, I haven't checked 1.8.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-01-2016 at 15:29.
Powerlord is offline