- Messages
- 8
- Country

Hi.
I'm having a problem when I access the variable: "Rotor brake active" after starting the flight simulator with the R22 the problem does not occur, is there any way to check if this variable is created in memory to be able to read?
SINT32 varInt;
execute_calculator_code("(A:Rotor brake active, bool)",NULL,&varInt,NULL);
First-chance exception at 0x20e32b02 in fs9.exe: 0xC0000005: Access violation reading location 0x0000005c.
When I debug the programming line up on the execute_calculator_code the problem happens, but after selecting the R22 the problem does not happen.
I did a routine to do the checking, but is there a better place for this?
//----------------------------------------------------------------------
bool CheckVarOK(PCSTRINGZ name)
{
bool lRet = false;
__try
{
execute_calculator_code(name , NULL, NULL, NULL );
lRet = true;
}
__except ( EXCEPTION_EXECUTE_HANDLER )
{
}
return lRet;
}
//----------------------------------------------------------------------
Help me, what should I do?
I'm having a problem when I access the variable: "Rotor brake active" after starting the flight simulator with the R22 the problem does not occur, is there any way to check if this variable is created in memory to be able to read?
SINT32 varInt;
execute_calculator_code("(A:Rotor brake active, bool)",NULL,&varInt,NULL);
First-chance exception at 0x20e32b02 in fs9.exe: 0xC0000005: Access violation reading location 0x0000005c.
When I debug the programming line up on the execute_calculator_code the problem happens, but after selecting the R22 the problem does not happen.
I did a routine to do the checking, but is there a better place for this?
//----------------------------------------------------------------------
bool CheckVarOK(PCSTRINGZ name)
{
bool lRet = false;
__try
{
execute_calculator_code(name , NULL, NULL, NULL );
lRet = true;
}
__except ( EXCEPTION_EXECUTE_HANDLER )
{
}
return lRet;
}
//----------------------------------------------------------------------
Help me, what should I do?

