Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

gau code problems!!!!!!!

Featured Replies

Hello everyone (:Im having compiling problems du to code.The compiler has problems about any make icon code,hear is a snip(MAKE_ICON( cdu_z, BMP_cdu_SMALL, NULL, IMAGE_USE_TRANSPARENCY 0, 247,83, MODULE_VAR_NONE, NULL, ICON_SWITCH_TYPE_SET_CUR_ICON, 1, 0, 0,)PELEMENT_HEADER cdu_background_plist[] ={ &cdu_z.header, NULL};///////////////////////////////MAKE_STATIC( cdu_background, BMP_cdu_SMALL_BACKGROUND, &cdu_background_plist, NULL, IMAGE_USE_TRANSPARENCY, 0, 0,0)PELEMENT_HEADER cdu_list= &cdu_background.header;the errors look like this(133)warning C4003: not enough actual parameters for macro 'MAKE_ICON'(133) : warning C4047: 'initializing' : 'int ' differs in levels of indirection from 'void *'(133) : error C2143: syntax error : missing ')' before 'constant'(133)error C2059: syntax error : ')'(133)error C2059: syntax error : ','thx for any help

Your structure for MAKE_ICON seems wrong.MAKE_ICON should have 14 parameters.There should be commas after every parameter except the last. There should be the same number of ( and ) brackets.

Gerry Howard

ok...When I open any examples they have 13 paremeters max? And there is no brackets around any paremeters? Am I not getting something?

If you want to get it right read the SDK.

Gerry Howard

  • Moderator

>ok...When I open any examples they have 13 paremeters max?>And there is no brackets around any paremeters? Am I not>getting something?>There are in fact 14 parameters used. Here is the template:MAKE_ICON( NAME, RES_ID, NEXT_LIST, FAILURE, DRAW_FLAGS, ASI_FLAGS, //Note: this is never used anymore! POSITION_X, POSITION_Y, SOURCE_VAR, CALLBACK, SWITCH_TYPE, NUM_ICONS, SCALE, //Note: this and the one following is almost never used! OFFSET //Note: as above... both are set as 0)Here is your code with the "missing stuff" filled in and with correct syntax (too many parenthesis and missing commas):MAKE_ICON( cdu_z, BMP_cdu_SMALL, NULL, NULL, IMAGE_USE_TRANSPARENCY, 0, 247,83, MODULE_VAR_NONE, NULL, ICON_SWITCH_TYPE_SET_CUR_ICON, 2, 0, 0)Take note however, since you put NULL for the callback, this won't actually DO ANYTHING! You've built a car, but didn't put an 'engine' in it... ;)FLOAT64 FSAPI STR_callback3( PELEMENT_ICON pelement){FLOAT64 rvalue=pelement->source_var.var_value.n;rvalue = (float)rvalue ; return rvalue;}

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thx bill for the "make icon" code. I didn't want it to do anything because of all the problems with the "export", thats why I put null for the callback. It was kind of funny, all this trouble with the "make icon" code and no troubles with the more "advanced code"...thx bill and everyone else(:.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.