Jump to content
  • 0
Sign in to follow this  
Main

Making new command

Question

Hello!

 

i want to make a new command in atcommand.c

but i'm afraid if each commands have unique number or something

 

is it ok to put a new command anywhere in atcommand.c?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Commands are enclosed in ACMD() functions. While I wouldn't say you could typically add a new command anywhere in atcommand.c, you can add a new command before or after these functions. 

 

Example:

 

ACMD(searchstore){	int val = atoi(message);		switch( val ) {		case 0://EFFECTTYPE_NORMAL		case 1://EFFECTTYPE_CASH			break;		default:			val = 0;			break;	}	 searchstore->open(sd, 99, val);		return true;}ACMD(mynewcommand){//...}

Share this post


Link to post
Share on other sites
  • 0

 

Commands are enclosed in ACMD() functions. While I wouldn't say you could typically add a new command anywhere in atcommand.c, you can add a new command before or after these functions. 

 

Example:

 

ACMD(searchstore){	int val = atoi(message);		switch( val ) {		case 0://EFFECTTYPE_NORMAL		case 1://EFFECTTYPE_CASH			break;		default:			val = 0;			break;	}	 searchstore->open(sd, 99, val);		return true;}ACMD(mynewcommand){//...}

Thank you sir!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.