Jump to content
Sign in to follow this  
Guest timewaster

gau code problems!!!!!!!

Recommended Posts

Guest timewaster

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest timewaster

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

Share this post


Link to post
Share on other sites

If you want to get it right read the SDK.

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites
Guest timewaster

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(:.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...