Sign in to follow this  
Guest HC001ST - Stick

Application Error

Recommended Posts

Ok. Everything was fine, but now although this gauge compiles with 0 warnings and 0 errors, when I attempt to load the aircraft with this gauge on the panel, I get an application error and FS9 exits.Here's the code:

// B206B3.EngOil.c//	Set up gauge headerchar eng_oil_gauge_name[]	= GAUGE_NAME;extern PELEMENT_HEADER		eng_oil_list;extern MOUSERECT			eng_oil_mouse_rect[];GAUGE_HEADER_FS700( GAUGE_W, eng_oil_gauge_name, &eng_oil_list, 						eng_oil_mouse_rect, 0, 0, 0, 0 );/////////////////////////////////////////////////////////////////////////////FAILURE_RECORD	eng_oil_temp_fail[] ={	{FAIL_SYSTEM_ELECTRICAL_PANELS, FAIL_ACTION_ZERO},	{FAIL_SYSTEM_ENGINE, FAIL_ACTION_FREEZE},	{FAIL_NONE, FAIL_ACTION_NONE}};FAILURE_RECORD	eng_oil_pressure_fail[] ={	{FAIL_SYSTEM_ELECTRICAL_PANELS, FAIL_ACTION_ZERO},	{FAIL_SYSTEM_ENGINE, FAIL_ACTION_FREEZE},	{FAIL_NONE, FAIL_ACTION_NONE}};/////////////////////////////////////////////////////////////////////////////MAKE_STATIC(	eng_oil_post,	BMP_ENG_OIL_POST,	NULL,	NULL,	IMAGE_USE_TRANSPARENCY|IMAGE_USE_LUMINOUS,	0,	90,90)PELEMENT_HEADER		eng_oil_post_list	= &eng_oil_post.header;// Oil Temperature//NONLINEARITY  eng_oil_temperature_nonlinearity[] ={	{{172,	72},	 CELSIUS_TO_RANKINE(150), 0},	{{172,	 182},	CELSIUS_TO_RANKINE(0), 0}};MAKE_NEEDLE(	eng_oil_temp_needle,	BMP_ENG_OIL_NEEDLE,	&eng_oil_post_list,	eng_oil_temp_fail,	IMAGE_USE_TRANSPARENCY|IMAGE_USE_ERASE|IMAGE_USE_LUMINOUS,	0,	134, 128,	0, 5,	GENERAL_ENGINE1_OIL_TEMP,	NULL,	eng_oil_temperature_nonlinearity,	4)PELEMENT_HEADER		eng_oil_temp_needle_list = &eng_oil_temp_needle.header;// Oil Pressure//NONLINEARITY  eng_oil_pressure_nonlinearity[] ={	{{84,	182},	 PSI_TO_PSF(0), 0},	{{84,	 72},	PSI_TO_PSF(150), 0}};MAKE_NEEDLE(	eng_oil_psi_needle,	BMP_ENG_OIL_NEEDLE,	&eng_oil_temp_needle_list,	eng_oil_pressure_fail,	IMAGE_USE_TRANSPARENCY|IMAGE_USE_ERASE|IMAGE_USE_LUMINOUS,	0,	122, 128,	0, 5,	GENERAL_ENGINE1_OIL_PRES,	NULL,	eng_oil_pressure_nonlinearity,	4)PELEMENT_HEADER eng_oil_psi_needle_list = &eng_oil_psi_needle.header;/////////////////////////////////////////////////////////////////////////////MAKE_STATIC(	eng_oil_background,	BMP_ENG_OIL_BACKGROUND,	&eng_oil_psi_needle_list,	NULL,	IMAGE_USE_TRANSPARENCY|IMAGE_USE_LUMINOUS_PARTIAL,	0,	0, 0)PELEMENT_HEADER eng_oil_list = &eng_oil_background.header;/////////////////////////////////////////////////////////////////////////////static  FLOAT64		FSAPI EngOil_Get_Celsius (FLOAT64 number, ID id, PCSTRINGZ string, MODULE_VAR *source_var, PGAUGEHDR gauge);MOUSE_TOOLTIP_ARGS (EngOil_Args)	MOUSE_TOOLTIP_ARG (GENERAL_ENGINE1_OIL_PRES, PSF_TO_PSI(1), NULL, NULL, NULL, NULL, NULL, NULL)	MOUSE_TOOLTIP_ARG (GENERAL_ENGINE1_OIL_TEMP, 1, NULL, NULL, NULL, EngOil_Get_Celsius, NULL, NULL)MOUSE_TOOLTIP_ARGS_ENDMOUSE_BEGIN( eng_oil_mouse_rect, HELP_NONE, 0, 0 )	MOUSE_PARENT_BEGIN( 0,0,120,256, HELPID_GAUGE_OIL_PRESSURE)		//MOUSE_TOOLTIP_ID (TOOLTIPTEXT_ENG1_OIL_PRESSURE_PSI)		MOUSE_TOOLTIP_TEXT_STRING ("Engine oil pressure (%1!d! PSI)", EngOil_Args)	MOUSE_PARENT_END	MOUSE_PARENT_BEGIN( 136,0,120,256, HELPID_GAUGE_OIL_TEMPERATURE)		MOUSE_TOOLTIP_TEXT_STRING ("Engine oil temperature (%2!d!

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Ok,Figured out the problem was not using this:

PELEMENT_HEADER		eng_oil_post_list[]	= {	&eng_oil_post.header,	NULL};

I'm guessing that this version of the MACRO is necessary as it forms a display order tree of its own.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this