Allow to set a default value for enum struct members
Most languages allow to set a default variable inside an enum, however SP does not. allowing a default variable as shown below could help to reduce the lines of code and make bugs less likely to occur because the developer forget to set the default values.
Exmaple:
enum struct Team {
int score = 0;
}
SourcePawn zero-initializes everything by default (excluding the "decl" keyword which is deprecated). If that's not happening for enum structs it's a bug.
It's probably about default values different from 0.
Confirmed that enum structs are zeroed by default, so marking this as a feature request. I like the idea, I'll start on it in early 2020.
It's probably about default values different from 0.
Yup, that was what i meant. wasn't aware that enum structs were zeroed by default