Advertisement
sindrijo

MonoDevelop IF ELSE NO CurlyBrackets BUG

Apr 30th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1.     public override void Update()
  2.     {
  3.         if (highScoreManager.Instance.hasHighScore(CurrentPlayer))
  4.             HighScoreText = "NEW HIGHSCORE!";
  5.         else
  6.             HighScoreText = "Sorry, better luck next time!";
  7.  
  8.         base.Update(); // This is considered part of the else block. ALWAYS USE CURLY BRACKETS TO AVOID HEAD-RAPING BUGS LIKE THIS.
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement