= 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?