View Single Post
Alienmario
Senior Member
Join Date: Aug 2013
Old 03-16-2020 , 09:59   Re: SourceMod 1.10 Now Stable!
#18

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

Last edited by Alienmario; 03-16-2020 at 12:28.
Alienmario is online now