View Single Post
  #7  
Old 05-14-2004, 04:07 AM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

= is the assignment operator, == is the equality operator

It's somewhat common to write:
Code:
if(($myplatinum == 100) && ($mygold == 0) && ($mysilver == 0) && ($mycopper == 0))
as:
Code:
if((100 == $myplatinum) && (0 == $mygold) && (0 == $mysilver) && (0 == $mycopper))
so that if you make a typo (ie: 100 = $myplatinum) it will give an error.

Not too sure why it was crashing. Your if-statement should have always evaluated to false, and executed the "quest::givecash($mycopper,$mysilver,$mygold,$mypl atinum);" part, I think. Maybe $mysilver and $mycopper were undef, and passing those back caused the crash?
Reply With Quote