I'm missing something... error in ode..

Blitz3D Forums/Blitz3D Userlibs/I'm missing something... error in ode..

Santiworld(Posted 2008) [#1]
hi, maybe this is a question to vip..

i made the racecar game with ode...


i start the game, and play the race.. all perfect..

when i finish the race and go to game menu, and try to start another new race, i have this error...

is in updategeom(), the sounds, tracks, cars, all, are successfuly loaded...
the game loop start, and in the first frame of the game in the second race, the error..



vip3d, do you have any idea off what could be the problem?..


VIP3R(Posted 2008) [#2]
It's difficult to say exactly without seeing some code to reproduce the error, but it sounds like you've deleted a body or geom and not recreated it before the second race. Or you might have deleted the reference (handle) to a body or geom. The code in the debugger is highlighted because the geom doesn't exist.

To pinpoint the problem exactly, I'll need to see some code showing the error.


Santiworld(Posted 2008) [#3]
hi VIP3R, i found the solution of my problem...

i want to thank you for your willing to help out always to solve doubts about ode.. is a very very big help to do this kind of programs...

the Solution :
like you said, the problem was the geom didn't exist..
when i finish a race, i delete all, except the ODEgeom types...
so, when i restart the race, the Function UpdateGeoms() failed because that.


;this is the solution :

.FINISHRACE ;RESETING ODE OBJETS AND DATA

   for ode.ODEGeom=Each ODEGeom   ; delete all ode objets
    delete ode                    ; 
    next                          ;

	dJointGroupDestroy(ContactGroup)
	dSpaceDestroy(Space)
	dWorldDestroy(World)
	dCloseODE()





VIP3R(Posted 2008) [#4]
You're welcome :)