Trying to detect no arg in spell

From: Chuck Carson (ccarson@phi.org)
Date: 09/14/99


I have a manual spell that that is defined as a TAR_IGNORE. What I need the
spell to do is take an argument from the castor, which is a valid attribute
such as strength, and then apply a bonus to that attribute. I have
everything working as I want except if the player does not specify an
attribute, I want the function to return after a nifty message. I have
played around with different things and cannnot get this to work. Here is
what I currently have. Also, if the player enters an argument but it is not
a valud one, this check works. Second, is this the best method to go about a
spell like this? Is it a priest spell, draw upon holy might, that
temporarily increases either str, dex, con, or cha. It can only be cast on
yourself and you need to specify the attribute to enhance.

Thus, the desired syntax is:

cast 'draw upon' str
or
cast 'draw upon' strength

// code snip
 strcpy(argument, arg);
  temp = argument;
  skip_spaces(&temp);

// This next check will not work
  if (!temp) {
     send_to_char("You must specify an attribute to enhance!\r\n", ch);
     return;
   }

  for (i = 0; i < 4; i++) {
    if (is_abbrev(temp, attrib_names[i])) {
      found = TRUE;
      break;
    }
  }

Thanks,
CC


     +------------------------------------------------------------+
     | 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