Enum.Index reporting wrong Index

getting the index of an enum is causing me trouble. when the enum is updated on patch startup, it reports a wrong index while the enum name is right.

see attached patch

any idea how to work around this problem ?

EnumIndexBug.v4p (4.7 kB)

bump.

any comment would be appreciated

EnumIndexBug2.v4p (9.4 kB)

ever since the major redo of enums, you should not rely on the index of enums anymore. with the possibility that enums can change during runtime, you are much safer only converting from and to strings.

yea i also end up using string instead enums

thing is, what if strings are the same ? in my case i can have states/enums, named the same. saying “use strings” while index is delivering a false number is not a solution for my problem.

the second patch illustrates that ord2enum “fixes” the bug. seems like it’s just an enum iobox update bug. which shouldn’t be too hard to fix, right ? if an enum finds an ord2enum upstream, it updates the index correctly.

To give you a heads up: We fixed the issue internally, but having build server troubles right now. Will report back once we’ve a running build with the fix included.

hey elias, thank you. good to hear it was fixable. no hurry concerning the build. thumbs up for the support

Check latest alpha please and thanks for the report!