Jump to content
  • 0

invalid command implementation please


Question

Posted

I want to display  INVALID COMMAND

when i missspell some words of the command

 

but  the char just  type it on the screen and that is so embarrasing how can I fix that?

 

 

sinttulouna.png

8 answers to this question

Recommended Posts

Posted

For GMs, the server already displays "________ is Unknown Command."

	//Grab the command information and check for the proper GM level required to use it or if the command exists
	info = get_atcommandinfo_byname(atcommand_checkalias(command + 1));
	if (info == NULL) {
		if( pc_get_group_level(sd) ) { // TODO: remove or replace with proper permission
			sprintf(output, msg_txt(153), command); // "%s is Unknown Command."
			clif_displaymessage(fd, output);
			atcommand_get_suggestions(sd, command + 1, *message == atcommand_symbol);
			return true;
		} else
			return false;
	}

To enable that for players too (group_id 0), edit trunk/src/map/atcommand.c (line 9299-9309)

Remove the pc_get_group_level(sd) check (line 9302) so it looks like this:

	//Grab the command information and check for the proper GM level required to use it or if the command exists
	info = get_atcommandinfo_byname(atcommand_checkalias(command + 1));
	if (info == NULL) {
		sprintf(output, msg_txt(153), command); // "%s is Unknown Command."
		clif_displaymessage(fd, output);
		atcommand_get_suggestions(sd, command + 1, *message == atcommand_symbol);
		return true;
	}
  • Upvote 1
Posted (edited)

Map server compilation error

that is not working

 

now I mess up my server

thank you so much

 

I will try to find solution in other forums

I am running revision 20120410 rAthena

 

 

Make Failed @Commands Say Invalid

simple as that!

 

 When a /Command is entered wrong, there is an "Invalid Command" message.

Do this work for @Commands too? Not everyone needs to see my typos.  ):

if you agree!     I know the embarresment of that.

 

can U ShARE YOUR ATTCOMMAND SOURCE FILE? 

 

I you say that

 

For GMs, the server already displays "________ is Unknown Command."

 

for what reason I am still watching this?

 

 

sinttulokur.png
Edited by iraciz
Posted

can U ShARE YOUR ATTCOMMAND SOURCE FILE?[/color]

Here is my trunk/src/map/atcommand.c (SVN revision 17205)

Map server compilation error

that is not working

Did you edit that whole code block "so it looks like this"? (what I pasted in the 2nd codebox)

If you only deleted line 9302, that's incorrect.

Posted (edited)

sorry, but fixchatbug choice wont let me type the @

 

I´m using ver SVN r17818

just in case

 

I has to look like this??

 

 

sinttulokiq.png
 
 
NICE THAT REALLY works, I apologize my dumbness
you know. I am just practicing my english since all this config, sql, and stuff like this came.
 
sinttuloino.png
 
 
Problem solved!! Thankyou Brian
Edited by iraciz
Posted

 

sorry, but fixchatbug choice wont let me type the @

 

I´m using ver SVN r17818

just in case

 

I has to look like this??

 

 

sinttulokiq.png
 
 
NICE THAT REALLY works, I apologize my dumbness
you know. I am just practicing my english since all this config, sql, and stuff like this came.
 

sinttuloino.png
 
 
Problem solved!! Thankyou Brian

 

can share the source pls

Posted

 

 

sorry, but fixchatbug choice wont let me type the @

 

I´m using ver SVN r17818

just in case

 

I has to look like this??

 

 

sinttulokiq.png
 
 
NICE THAT REALLY works, I apologize my dumbness
you know. I am just practicing my english since all this config, sql, and stuff like this came.
 

sinttuloino.png
 
 
Problem solved!! Thankyou Brian

 

can share the source pls

 

 

Impossible! I mean, is not the same source for all revisions! send me your atcommand.c and we talk about it via inbox.

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...