title: PlayFramework make a function that returns an Integer in Twirl?
body: <p>so here is what I want the function to look like:</p>
  
  <pre><code>@getMaxLevel(buildingId : Integer) = @{
      if levelMap.get(buildingId) == null 1 else levelMap.get(buildingId)
  }
  </code></pre>
  
  <p>But the problem is when I call this I get an error about a missing bracket, which there isn't (because if I replace the contents of the message with, say, <code>3</code> then everything works</p>
  
  <p>How do I tell Twirl to have this as a method I call in my Twirl code?</p>