🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Using enum in include file gives ERR Name conflict [] is a named type

Started by
1 comment, last by WitchLord 4 years, 1 month ago

< SOLVED >

My host program searches the script directory for any scripts, and automatically includes them as a module.

The enum.h is in the same directory as the script - and the script is also #including it. So it's getting compiled automatically, and also being included in the main script file.

Remove the #include from the main script and it works.

Hi

I'm using a shared file which has all the enum values between the host and script file.

When compiling the script I get the following:

enum.h (2, 7) : ERR  : Name conflict. 'PARA_EVENT_TYPES' is a named type.
enum.h (9, 6) : ERR  : Name conflict. 'EVENT_ACTIONS' is a named type.
enum.h (21, 6) : ERR  : Name conflict. 'variableTypes' is a named type.
enum.h (32, 6) : ERR  : Name conflict. 'consoleFunctionSource' is a named type.
enum.h (38, 6) : ERR  : Name conflict. 'currentModes' is a named type.

Advertisement

I'm glad you solved it.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement