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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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