Need help with an error message

Updated on March 3, 2017 in  [R] Scripts
Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0
2 on March 2, 2017

 public void SellTurret()

    {

        PlayerStats.Money += turretBlueprint.GetSellAmount ;
        //Spawn Cool effect
        Destroy (turret);

        turretBlueprint = null;

    }

I have that code and this error message opens up. I don’t really know what I’m doing wrong, it does it on the PlayerStats.Money line, just so you know .

ERROR MESSAGE: Operator `+=’ cannot be applied to operands of type `int’ and `method group’

  • Liked by
Reply
1 on March 2, 2017

You forgot the “()” after GetSellAmount.

on March 3, 2017

Man I feel even more dumb after my questions get answered sometimes. Thank you, that’s what was wrong.

Show more replies
  • Liked by
Reply
Cancel