Thread: Compiler bug?
View Single Post
Author Message
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 04-29-2009 , 01:46   Compiler bug?
Reply With Quote #1

Can someone confirm this is a compiler bug?

Code:
enum MyEnum
{
    Option1,
    Option2,
    Option3,
}

new MyArray[MyEnum];

MyFunction1(value)  // This function works and compiles fine.
{
    MyArray[Option1] = value;
}

MyFunction2(MyEnum:enum, value)  // I get a tag mismatch warning on 'MyArray' line.
{
    MyArray[enum] = value;
}
Is this simply a limitation of pawn, or is it a bug in the compiler?

EDIT:

Note that it the warning seems to be redundant, as the code works as expected.
__________________

Last edited by Greyscale; 04-29-2009 at 01:48.
Greyscale is offline