bool spec guard

Posted by Ithildin on Thu 23 Sep 2004 07:28 PM — 3 posts, 17,131 views.

USA #0
In this bool, what this does is sees if the character is outlawed, crimmed, or aggressive to the race. but if my character is disguised, i want him to bypass taht. i put this in the bool:


if (xIS_AFFECTED (ch, AFFX_DISGUISE))
                 {
                 act ("$n intently scans around the room.\n\r", ch, NULL, NULL, TO_ROOM);
                         return;
                 }


but it comes up as a warning. i figure i can't put a return in a bool statement? what would i put in then?

here's my warning;

return' with no value, in function returning non-void

so i'm not sure what else i can use.
USA #1
try this:

if (xIS_AFFECTED (ch, AFFX_DISGUISE))
{
   act ("$n intently scans around the room.\n\r", ch, NULL, NULL, TO_ROOM);
   return FALSE;
}
USA #2
Yes. The 'bool statement' is actually a function returning a boolean. It's telling you that you shouldn't just return out of the function; you have to return something.