I'm getting a syntax error I can't figure out (AGS v3.6.1). As a minimal example:
struct Storage
{
Object* oArray[];
}
Object*[] GetArray()
{
Storage s;
Object* oArray[] = s.oArray; // <-- Error "Type mismatch: cannot convert 'Object*' to 'Object*[]'"
return oArray;
}
It works if I do:
Object*[] GetArray()
{
Object* dummyArray[];
Object* oArray[] = dummyArray;
return oArray;
}
... So it must have something to do with accessing it from the struct. Is there a correct syntax, or have I hit an engine limitation?
I posted your first code snippet into 3.6.1 editor, and it compiled fine...
Damn, I must have made a mistake when I reduced it to the simplest case. The error had to do with an array of this struct, which isn't permitted, but it never got to that exception. Thanks!