Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hi!

I don't have that probem, because I have all enums in separate script.

So, I dont scatter macros and enums all across the code, but keep them in two scripts "macros" and "enums".  I could also put them together in one script.

And you don't have to call those scripts anywhere, because enums and macros are set by a pre-processor.  When compiler kicks in, your macros and enums are already set.

If you reorganize your project like this, you won't have this issue.

Hope it helps.

Hi Drindilica - I actually have all my enums/macros declared in one init script called at the start of the project. I'm not setting enum in this case, I'm only trying to reference them :) 

Ah sorry!

Just to test it I put one usage of an enum value into one Draw event which has live_enabled. It works for me. I don't get any errors on saving the file:

I'm using the latest stable GMS2 IDE and the lastest runtime.  (2.2.4.459 / 2.2.4.366)

Yeah - it hasn't always been the case, I had it working just fine at the start, it's strange how it's started recently.

Although, my enum/macro init script is close to 900 lines now, as the project is very large. It shouldn't be the issue though - I'm trying to replicate with new project so I can establish more details around what could be causing it.