About Store Forum Documentation Contact



Post Reply 
[Code Editor] Bug?
Author Message
Dandruff Offline
Member

Post: #1
[Code Editor] Bug?
If i do
[Image: 3402fb68af334922928414e.png]

compiler throws

[Image: 4f9c8873d9cc485892ac16b.png]


However, if i split it up, it works
[Image: 69ee004b101a43d0aeed262.png]
08-11-2011 01:57 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: [Code Editor] Bug?
are you using latest SDK?

I've just tried code:
Code:
Game.ObjMemx<Game.Item> Items;
enum OBJ_TYPE
{
   OBJ_ITEM,
}
void main()
{
   Game::World.init()
              .setObjType(Items, OBJ_ITEM)
              .New("World/barrels.world")
              .update(Cam.at);
}
and it works ok
08-11-2011 12:27 PM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #3
RE: [Code Editor] Bug?
Oo, i tried replacing

Code:
#include "../../../data/enum/_enums.h"

with

Code:
enum OBJ_TYPE
{
   OBJ_ITEM,
}

and it compiles without errors
(This post was last modified: 08-11-2011 09:11 PM by Dandruff.)
08-11-2011 09:09 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: [Code Editor] Bug?
you can't use #include in CE, you must include headers in Project Settings (right click on App)
08-11-2011 09:16 PM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #5
RE: [Code Editor] Bug?
Oh i see, thanks
08-11-2011 09:32 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #6
RE: [Code Editor] Bug?
You don't necessarily need to manually load the enum file, however. You could just do this:

Code:
Game::World.setObjType(Items, Game::ObjType("OBJ_ITEM"));

The obj_type.enum file is automatically loaded internally when you call Game::World.init().

----------

On a seriously way off-topic note, this is my first post as a Licensed Developer grin
08-11-2011 10:34 PM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #7
RE: [Code Editor] Bug?
haha, it's about time! Posted on my topic too, yay! smile
08-11-2011 10:52 PM
Find all posts by this user Quote this message in a reply
Post Reply