SOLVED enum assignment must be an integer value

Azenris

Member
I foolishly edited too much code at once. and between 2 commits have started getting an error I dont know how to solve.

I get spammed with
enum assignment must be an integer value

GML:
enum ENTITY_AMBIENT_LIGHT_INFO
{
    LIGHT_COLOUR = ENTITY_MACHINE_INFO.COUNT,

    COUNT
};
the error being at LIGHT_COLOUR = ENTITY_MACHINE_INFO.COUNT,

ENTITY_MACHINE_INFO is an enum itself

GML:
enum ENTITY_MACHINE_INFO
{
    ACTIVE = ENTITY_INTERACTIVE_PLACEABLE_INFO.COUNT,
    SWITCHED_ON,
    BIOMASS_HELD,
    BIOMASS_CAPACITY,
    BIOMASS_COST_TO_ACTIVATE,
    BIOMASS_COST_PER_HOUR,
    POWERED_BY,

    COUNT
};
which doesn't get any errors.

the actual enum setup hasn't changed at all.

So the problem is probably a silly one. made elsewhere, but i've never had this error before to know what I broke elsewhere.

I made many changes and will take ages to go through so im just asking here first if anyone has had this error for a mistake elsewhere.
 

Azenris

Member
Oh my, im starting to think its an ordering issue... I have had all these enums in the create even of objects and I must have gotten lucky this whole time with ordering, but with my recent changes, the objects are no longer being checked in the same order during compile and certain enums are not yet declared.

It too boiling IRL ro test/fix now. Will check out tommoz and see.
 

Azenris

Member
Yes that was the problem, I can't believe I got away with it for so long. I put them all into a single script ordered and it works :]
 
Top