
Getting an Exception Violation report
Hi all, im running into a error and am not quite sure what to do and would love feedback
Im making special files with void statements to run special void statements for my sensors and including them in my robot projects. I ran into a weird error and wanted some feedback from people. I made a demo program to show when it happens
Here is my main robot program here:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void TurnRight()
{
motor[motorB]=100;
}
void TurnLeft()
{
motor[motorB]=-100;
}
void Stop()
{
motor[motorB]=0;
}
task main()
{
ComplexThing();
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is the file I include to do ComplexThing(), then control the
robot in accordance until the void is completed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void ComplexThing()
{
// do some complex logic, then control the motors in accordance
TurnRight();
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I run the main segment of code with the second file included, i get the following error message
Does anyone have any idea why this happens. If i move ComplexThing() to the main file, the code executes just fine but I want this to work so I can make sensor drivers and universal statements that directly control my motors.
Another thing, why does the error message say RCX Exception Violation when im working with the NXT ?????
Thanks!
Scott