View Single Post
  #2  
Old 08-22-2004, 03:59 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default Re: $class == warrior?

Quote:
Originally Posted by hypershadow66
The lines are this

Code:
}
 if (($itemcount{22} == 4) && ($class == WARRIOR))
{
quest::say("Thank you Warrior for your help.  Here is a mighty sword for your troubles!");
quest::summonitem(23);
}
 if (($itemcount{22} == 4) && ($class == CLERIC))
{
quest::say("Thank you Cleric for your help.  Here is a mighty mace for your troubles!");
quest::summonitem(24);
}
but it doesnt work? The class names where tried in all caps/lower caps, etc. and still didnt work. What should be done to fix this?
Try:
Code:
}
if($itemcount{22} == 4)
  {
  if($class == Warrior)
    {
    quest::say("Thank you warrior for your help. Here is a mighty sword for your troubles.");
    quest::summonitem(23);
    }
  if($class == Cleric)
    {
    quest::say("Thank you cleric for your help. Here is a mighty mace for your troubles.");
    }
  }
} 
#
#Last } closes sub EVENT_SAY so remove it if not done
#
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote