Re: [CODE] Online Setting of Command Min_Levels

From: George Greer (greerga@circlemud.org)
Date: 07/02/99


On Sat, 3 Jul 1999, Julian Buckley wrote:

>ACMD(do_asdf)
>{
> char newcmd;
>  sh_int newlev;
>
>  half_chop(argument, buf, arg);
>
>  if (!*buf || !*arg || !isdigit(*arg))
>    send_to_char("Syntax: asdf <command> <newlevel>\r\n", ch);
>  else {
>    newcmd = strdup(buf);

newcmd = char
strdup = char *

>    newlev = atoi(arg);
>
>    if (arg <= 0)
>      log("Invalid.");
>    else {
>      complete_cmd_info[newcmd].minimum_level = arg;

'newcmd' should be an 'int' index anyway.

Use 'find_command()' to get an index.

--
George Greer
greerga@circlemud.org


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST