I think I may have found a bug.
Quote:
enum struct Foo
{
bool bar;
void IsSame(Foo otherFoo)
{
PrintToServer("IsSame %d", this.bar == otherFoo.bar);
}
}
|
Gives compiler error 159 on the line where method starts: brackets after variable name indicate a fixed-size array, but size could not be determined - either specify sizes, an array initializer, or use dynamic syntax (such as 'char[] x')
While this work fine.
Quote:
enum struct Foo
{
bool bar;
void IsSame(Foo[] otherFoo)
{
PrintToServer("IsSame %d", this.bar == otherFoo[0].bar);
}
}
|
Edit: nevermind, it has already been reported
https://github.com/alliedmodders/sourcepawn/issues/307