do_improve

From: Blake Weaver (weaver@charlie.ece.scarolina.edu)
Date: 03/20/96


Thanks for the suggestions on the do_improve.  I've gone with Hades suggestion
for now and it seems to work.  Unfortunately I'm getting even more odd errors
now...Here is the whole blame thing ACK!

ACMD(do_improve)
{
   one_argument(argument, arg);

   if (isname("str", arg))
        {
        if (ch->real_abils.str < 18)
                {
                ch->real_abils.str = ch->real_abils.str + 1;
                GET_STR(ch) = GET_STR(ch) - 5;
                }
        else
                sprintf(buf, "Already at 18.\r\n");
        }
   if (isname("stradd", arg))
        {
        if (ch->real_abils.str_add < 100)
                {
                ch->real_abils.str_add = ch->real_abils.str_add + 10;
                GET_ADD(ch) = GET_ADD(ch) - 2;
                }
        else
                sprintf(buf, "Already at 100.\r\n");
        }
   if (isname("dex", arg))
        {
        if (ch->real_abils.dex < 18)
                {
                ch->real_abils.dex = ch->real_abils.dex + 1;
                GET_DEX(ch) = GET_DEX(ch) - 5;
                }
        else
                sprintf(buf, "Already at 18.\r\n");
        }
   if (isname("wis", arg))
        {
        if (ch->real_abils.wis < 18)
                {
                ch->real_abils.wis = ch->real_abils.wis + 1;
                GET_WIS(ch) = GET_WIS(ch) - 5;
                }
        else
                sprintf(buf, "Already at 18.\r\n");
        }
   if (isname("int", arg))
        {
/* AT THIS POINT IT TELLS ME THERE IS A PARSE ERROR BEFORE 'int' */
/* however, this line is no different from the rest of lines like it
except that it has 'int' instead of 'dex' or what ever.  I don't get it.*/
        if (ch->real_abils.int < 18)
                {
                ch->real_abils.int = ch->real_abils.int + 1;
                GET_INT(ch) = GET_INT(ch) - 5;
                }
        else
                sprintf(buf, "Already at 18.\r\n");
        }
/* I am getting another parse error here before 'if'*/
   if (isname("con", arg))
        {
        if (ch->real_abils.con < 18)
                {
                ch->real_abils.con = ch->real_abils.con + 1;
/* I am getting another parse error here before '->' of which I don't even see*/
                GET_CON(ch) = GET_CON(ch) - 5;
                }
        else
                sprintf(buf, "Already at 18.\r\n");
        }
   if (isname("cha", arg))
        {
        if (ch->real_abils.cha < 18)
                {
                ch->real_abils.cha = ch->real_abils.cha + 1;
/* I am getting another parse error here before '->' of which I don't even see*/
                GET_CHA(ch) = GET_CHA(ch) - 5;
                }
        else
                sprintf(buf, "Already at 18.\r\n");
        }
}

I hope you can follow all that mess.  And am sorry it so sloppy.  If you can
an error that I can't please let me know.  You've been great help already.
Thanks again.

B. Weaver



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