View Single Post
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-15-2010 , 14:06   Re: How is this a tag mismatch?
Reply With Quote #4

I think I may have figured it out.

When referencing an enum item directly, it uses the type of that item. So above since SDKLibCall_TerminateRound doesn't have "Handle:" before it in the enum then when I use it it's reading it as an integer.

But if I use an "SDKLibCalls"-typed variable then it would read the type of the array.
Code:
new SDKLibCalls:sdkcall = SDKLibCall_TerminateRound;
SDKCall(g_hSDKCall[sdkcall], client, delay, _:reason);
So that compiles without warning. Kind of sucks that I have to tag every item as Handle though. But I'm assuming that's just Pawn's design.

EDIT: Just realized I can't tag each one as a handle because multiple arrays are using that enum.

This seems like a design flaw. It should be taking the tag of the array not the enum member. Any SM devs have anything to say about this?
__________________

Last edited by Greyscale; 07-15-2010 at 14:19.
Greyscale is offline