sv3nxd
Member
Enums can be declared in an unused script and then be used anywhere in the project - just like macros, but for some reason they get shown as unassigned.
Am I doing something wrong?
Script:
Any event or place in the project:
Screenshot:
SOLUTION:
Am I doing something wrong?
Script:
GML:
//Script
enum MY_ENUM {
ENTRY1,
ENTRY2,
ENTRY3
}
GML:
//e.g step event of an object
switch(value) {
case MY_ENUM.ENTRY1 : //<- Works, but shows as a warning, unassigned
//something
break;
case MY_EN ...
.
.
.
}
SOLUTION:
Nevermind, I wanted to create an example project to show the behavior, but for some reason I couldn't reproduce the error.
Going back to my other project didn't work either, it was fixed out of the blue.
So apparently retstarting the IDE/changing projects fixes the error.
So I guess for anyone facing this as well: The good ol' "Have you tried turning it off and on again?" should work fine.
Last edited: