Code: Select all
class A{
enum B {
AVal,
BVal
}
};
Thanks.
Moderator: OpenTTD Developers
Code: Select all
class A{
enum B {
AVal,
BVal
}
};
this:Yexo wrote:Because that's not valid syntax in squirrel. See http://squirrel-lang.org/doc/squirrel2.html for the language documentation.
Code: Select all
enum Stuff {
first, //this will be 0
second, //this will be 1
third //this will be 2
}
Code: Select all
enumerations := ( ‘id’ '=' Integer | Float | StringLiteral ) [‘,’]
stat:= 'enum' id '{' enumerations '}'
so?Yexo wrote:Defining an enum inside a class in not possible in squirrel, I was referring to that. Classes in squirrel are tables with some extra syntactic sugar.
Code: Select all
class A{
};
enum id {
A=1,
B=2
};
Squirrel compiles that code without any errors, if SQDev doesn't support it that's a problem in SQDev and should be reported to it's developers, not here.SummerBulb wrote:this:doesn't work either.Code: Select all
class A{ }; enum id { A=1, B=2 };
Users browsing this forum: No registered users and 38 guests