Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: subspark on Sun 25/03/2007 04:57:56

Title: DefineButton Pushed
Post by: subspark on Sun 25/03/2007 04:57:56
I'm making an updated LEC Type interface for AGS 2.7/2.8 Alpha 4 however my buttons include a pushed image rather than just a mouse off and mouse over state. So three states al up. The problem arisies when trying to code such a function. For example:

function DefineButton(int mode, int button, int normalbuttonpic, int overbuttonpic int pushedbuttonpic){
  //Define the buttons for a template mode. Call it in game_start for each mode to
  //set them all up.
  Tmode[mode].button=button;
  Tmode[mode].pushedbutton=pushedbuttonpic;
  Tmode[mode].highlightedbutton=overbuttonpic;
  Tmode[mode].normalbutton=normalbuttonpic;
}


...returns the error:
PE02: Parse error at 'int'.

I can't figure out the right way to code it. Any ideas?
Title: Re: DefineButton Pushed
Post by: strazer on Sun 25/03/2007 05:39:42
Quote
int overbuttonpic int pushedbuttonpic){

Missing separating colon, for instance.
Title: Re: DefineButton Pushed
Post by: GarageGothic on Sun 25/03/2007 10:16:12
Not colon, comma
Title: Re: DefineButton Pushed
Post by: strazer on Sun 25/03/2007 14:53:58
Heh, of course, that's what I meant. :P