View Single Post
  #4  
Old 03-13-2006, 11:00 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Quote:
Originally Posted by TheClaus
Just glancing at it I see the logic is very wrong. I am not sure if questing has BOOLEAN but I am going off of Perl which does.

Instead of this.



Try this


That might work. I don't have an emulator to test but I would say that having multiple ifs just won't work.
No, those two things are saying different statements.

if(something || somethingelse || somethingelse) checks to make sure at least one of those are true.

if(something)
{
if(somethingelse)
{
if(evenmoreelse)
{
do something;
}
}
}

something else must have something to run, and evenmore else must have both somethingelse and something to run.

Completely different statements.
__________________
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