Making new command

Main

New member
Messages
15
Points
0
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?

 
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:

Code:
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){//...}
 
Last edited by a moderator:
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!

 
Last edited by a moderator:
Back
Top