About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
Can't load obj_type.enum
Author Message
unforgivenhero Offline
Member

Post: #1
Can't load obj_type.enum
Alright so no matter what I try, I cannot get my game to load obj_type.enum. The paths to the h files are correct, but the game won't load it. I even built my world in the editor and tried copying over the defauly enums from the Esenthel Engine data folder.

Has anybody else encountered this problem and/or know how to fix it?
06-27-2011 02:25 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: Can't load obj_type.enum
1) Are you calling DataPath() before Game::World.init()?
2) Double check path again -- DataPath() + "Enum/obj_type.enum.h"
06-27-2011 03:01 AM
Find all posts by this user Quote this message in a reply
unforgivenhero Offline
Member

Post: #3
RE: Can't load obj_type.enum
1) Yes I am
2) Tried that and I'm getting:

"error C2011: 'OBJ_TYPE' : 'enum' type redefinition
1> x:\game projects\requiem\data\enum\obj_type.enum.h(3) : see declaration of 'OBJ_TYPE'."

I think it has to do with the obj_items that's in my game, but I don't see how it is wrong because I based it almost exactly off one of the tutorials: game world with character.
06-27-2011 03:08 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #4
RE: Can't load obj_type.enum
Well, I meant if you take the value of DataPath() and append "Enum/obj_type.enum" to it, that is the full path to the obj_type.enum file that needs to exist. Check to make sure that path exists on your computer. I'm assuming its "x:\game projects\requiem\data\enum\obj_type.enum".

Assuming that is the correct path, was it loading the obj_type.enum file before? Did you change something? What's the contents of obj_type.enum.h?

Note: It should be just .enum, not .enum.h - put the wrong file earlier.

----------
You could also try putting your obj_type.enum file in the EE Data/Enum folder and running the "World with Character" tutorial -- and see what happens..
(This post was last modified: 06-27-2011 05:02 AM by Driklyn.)
06-27-2011 04:55 AM
Find all posts by this user Quote this message in a reply
unforgivenhero Offline
Member

Post: #5
RE: Can't load obj_type.enum
obj_type.enum.h contains the defaults, I copied it over from the Esenthel sdk folder. The path is correct but it still won't load.

I declare #include "../Requiem/Data/Enum/_enums.h" at the top of my game.cpp file. Since _enums.h includes the other headers, specifically obj_type.enum.h, I don't see why it is not loading.

And the world with character tutorial works with my obj_type.enum, so it must be a program with my code.
06-27-2011 10:18 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #6
RE: Can't load obj_type.enum
When you call Game::World.init(), it loads the obj_type.enum file from the Enum folder of the path set via DataPath(). The include is irrelevant, it only allows you to use the enums in your code -- the world does not know of its existence.

Code:
DataPath("../Requiem/Data");
Game::World.init();
06-28-2011 06:33 AM
Find all posts by this user Quote this message in a reply
unforgivenhero Offline
Member

Post: #7
RE: Can't load obj_type.enum
ah ok that id the trick. thanks
06-28-2011 02:06 PM
Find all posts by this user Quote this message in a reply
Post Reply