About Store Forum Documentation Contact



Post Reply 
Tutorial has stopped - error.
Author Message
Truelegend Offline
Member

Post: #1
Tutorial has stopped - error.
I have this error and why?
Code:
/******************************************************************************/
#include "stdafx.h" // include precompiled header
#include <EsenthelEngine/Enum/_enums.h>
/******************************************************************************/
Game::ObjMemx<Game::Item   >   Items   ;
Game::ObjMemx<Game::Static >   Statics ;
Game::ObjMemx<Game::Chr    >   Chrs    ;
/******************************************************************************/
void InitPre()
{
     App.name("Start");    
     App.flag=EE::APP_MS_EXCLUSIVE|EE::APP_FULL_TOGGLE;
     DataPath("../data");
     Paks.add("../data/engine.pak");
     D.sync(true);                  
}
/******************************************************************************/
Bool Init()
{
     Game::World.init()
        .setObjType(Items   , OBJ_ITEM)
        .setObjType(Statics , OBJ_STATIC)
        .setObjType(Chrs    , OBJ_CHR)
     .load("world/sample.world");
     return true;
}
/******************************************************************************/
void Shut()
{
}
/******************************************************************************/
Bool Update()
{
     if(Kb.bp(KB_ESC))return false;

     {
            Cam.yaw  -=Ms.d().x;
            Cam.pitch+=Ms.d().y;
            Cam.dist=2.4f;    
            Cam.setSpherical(Items[0].pos(), Cam.yaw, Cam.pitch, 0, Cam.dist);
     }

     return true;                  
}
/******************************************************************************/
void Render()
{
    Game::World.draw();
}
/******************************************************************************/
void Draw()
{
     Renderer(Render);
}
/******************************************************************************/
Everything seems to be good. what is wrong?
04-17-2011 11:24 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Tutorial has stopped - error.
what error?
post screen/error/call stack
04-17-2011 11:27 AM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #3
RE: Tutorial has stopped - error.
Tutorial has stopped and there is write send report. etc...
[Image: imgs.png]
(This post was last modified: 04-17-2011 11:35 AM by Truelegend.)
04-17-2011 11:29 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: Tutorial has stopped - error.
read my post here http://www.esenthel.com/community/showth...4#pid23184
http://www.esenthel.com/community/showth...p?tid=2862
if you still have error, run in debugging and show the call stack
04-17-2011 11:32 AM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #5
RE: Tutorial has stopped - error.
But when i changed Bool update() function to
Code:
Bool Update()
{
     if(Kb.bp(KB_ESC))return false;

     CamHandle(0, 10, EE::CAMH_ROT|EE::CAMH_MOVE);

     return true;                  
}

i dont have this error
04-17-2011 11:34 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Tutorial has stopped - error.
Items[0].
you're code is wrong.. the 0 element doesnt exist
04-17-2011 11:36 AM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #7
RE: Tutorial has stopped - error.
It does exist. okey so i tried Chrs[0] i have Character 0 and is still the same :(
04-17-2011 11:39 AM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #8
RE: Tutorial has stopped - error.
But you don't know if they exist when update run so you need add if.
Quote:if(Chrs.elms())
if(Items.elms())
Look to tutorials.
04-17-2011 11:50 AM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #9
RE: Tutorial has stopped - error.
I done this and they doesnt exist but why? when i go to world editor i have 1 character object . so why is not in engine?
Okey is working now i changed my old code and it it working. But code is the same. i dont know. anyway thanks
(This post was last modified: 04-17-2011 11:59 AM by Truelegend.)
04-17-2011 11:53 AM
Find all posts by this user Quote this message in a reply
Post Reply