Esenthel
Administrator
|
RE: Strange Break/Continue Error
thanks for the info, however it is possible that you have an error somewhere else in the codes.
1-are you sure you're using correct headers+lib file?
2-I could take a look at your codes (you can send them to my email)
|
|
03-23-2010 05:33 PM |
|
Harry
Member
|
RE: Strange Break/Continue Error
1. Yes.
2. I sent it.
|
|
03-23-2010 09:50 PM |
|
Esenthel
Administrator
|
RE: Strange Break/Continue Error
There are too many codes so I could check them all.
how frequently you have this error?
In your situation I'd check if you correctly save/load all objects (if << are matched with >> in save/load methods)
-try rebuild your world first (remove all previous save games if you were using them for testing)
-if you still have this problem, try disabling creation of some objects (for example don't load cars), maybe the problem will narrow down to a specific class
|
|
03-26-2010 01:07 AM |
|
Harry
Member
|
RE: Strange Break/Continue Error
I have this error always when I fly some time outside the prison near parking (I don't check how situation looks in another places).
1. All << >> are set ok.
2. Rebuild doesn't help.
3. When I disable AI objects error disappear so I'll try to find the problem somewhere in AI.cpp.
|
|
03-26-2010 12:49 PM |
|
Esenthel
Administrator
|
RE: Strange Break/Continue Error
you have one small error, but I doubt that this is causing the problem:
Chr::die
if(Players[0].level<20)Players[0].exp+=expAdd;
you dont check if the 0-th object exists in the container
first do if (Players.elms())
check AI.cpp and also all other codes which refer to the AI
|
|
03-26-2010 03:59 PM |
|
Harry
Member
|
RE: Strange Break/Continue Error
I made more tests in different situations and I found that this problem is only when player is flying. I run about 5 minutes around area where I usually obtain error and nothing happens. But when I turned on flying and flew about 3 meters I got this error again.
|
|
03-28-2010 12:17 AM |
|
Esenthel
Administrator
|
RE: Strange Break/Continue Error
all of the members have incorrect values, perhaps you've used c++ optimizations enabled in your project settings?
when you're flying, you're travelling faster, when you're travelling faster, the methods for unloading/loading world areas are called more often.
I've tested flying through the hole level in Bloody Massacre demo, but haven't encountered any error.
You could try to disable loading the Player object,
and then just move the camera through the whole world a little.
|
|
03-28-2010 12:28 AM |
|
Harry
Member
|
RE: Strange Break/Continue Error
(03-28-2010 12:28 AM)Esenthel Wrote: all of the members have incorrect values, perhaps you've used c++ optimizations enabled in your project settings?
when you're flying, you're travelling faster, when you're travelling faster, the methods for unloading/loading world areas are called more often.
I've tested flying through the hole level in Bloody Massacre demo, but haven't encountered any error.
You could try to disable loading the Player object,
and then just move the camera through the whole world a little.
No, I set it to disabled.
I disable Player and set camera like in Small Overlays tutorial. I moved camera through all prison and I got this error again still near the same place.
|
|
03-28-2010 11:32 AM |
|
Esenthel
Administrator
|
RE: Strange Break/Continue Error
please try narrowing down the error - remove loading all objects / commenting out more codes step by step, so your project will get smaller, but the error still occurs
if you'd like I could test this by myself. but I would need your world data, (and updated codes since the last changes that you made - if any)
|
|
03-28-2010 03:17 PM |
|
Harry
Member
|
RE: Strange Break/Continue Error
When I comment case AI_GUARD I have no error:
Code:
switch(type)
{
case AI_PRISONER:
if((time_to_random_move-=Time.d())<=0)
{
if(!action)
{
actionMoveTo(pos()+Random.vec(-3,3));
time_to_random_move=RandomF(3,10);
}
}
break;
case AI_GUARD:
if(Game::Waypoint *waypoint=Game::World.findWaypoint(waypointName)) // if waypoint exists
{
if(!action)
{
if(!move_walking)move_walking=true;
move_to=(move_to+1)%waypoint->points();
actionMoveTo(waypoint->point(move_to).pos);
}
}
break;
}
Do I have something wrong in this code?
(This post was last modified: 03-29-2010 08:27 PM by Harry.)
|
|
03-29-2010 08:26 PM |
|
Esenthel
Administrator
|
RE: Strange Break/Continue Error
it looks ok, please keep AI_GUARD uncommented, and try to comment more of other codes, to narrow down the problem
|
|
03-29-2010 08:39 PM |
|
Harry
Member
|
RE: Strange Break/Continue Error
All save, load and draw functions etc. comment too? Or only this what is in update? If I comment setObjType should I comment codes for this objects or they are automatically not used?
I comment all setObjType except Player and AI. In Player.cpp I comment everything except player movement. In Ai I comment everything except this switch which I showed in last post. I comment also another codes in Game like weather, explosions, bullets, game saving, not used camera modes, inventory etc. and error still occurs.
I have no error only when I comment actionMoveTo(waypoint->point(move_to).pos); line.
(This post was last modified: 03-29-2010 09:37 PM by Harry.)
|
|
03-29-2010 09:14 PM |
|
Esenthel
Administrator
|
RE: Strange Break/Continue Error
please comment as much as you can.
when you'll get to the point that you can't comment any more codes then let me know
I'll investigate the problem then, by checking your minimized version of the codes. (send me then the codes)
|
|
03-29-2010 11:08 PM |
|