I got
this error when adding this code (and only this code) to the update function:
float Angle, Distance;int Type;if( g_pCore->GetNumObjectsInSight( ) > 0 ) { g_pCore->GetObjectsInSight( 1, Type, Angle, Distance );}g_pCore->TurnRight( 0x20 );
Sometimes it crashes right away, and sometimes the robot has the time to turn around until it sees something, at which point it crashes.
The same error happens if I try to reach object 0 instead of 1.
Compiling using Visual C++ 6.
EDIT: some more precision. I am logging data to file, in the following pattern:
LOG( "Sighted" )
g_pCore->GetObjectsInSight( 0, Type, Angle, Distance );
LOG( "Done" )
My log reads "Sighted" around 20 times, then "Done". Also, the "Abandon/Retry/Ignore" window does not simply pop once, but rather quickly flashes as if multiple instances of it were appearing.
ToohrVyk
[edited by - ToohrVyk on August 2, 2003 3:36:00 PM] [edited by - ToohrVyk on August 2, 2003 3:57:15 PM]