So I have this code (all of this is in the one scala.html file):
@getLevelAsRoman(level: Integer) : String = @{
@if(level == 1){
@return "I"
}
@if(level == 2){
@return "II"
}
@if(level == 3){
@return "III"
}
}
And I call it like this:
@{move.getMove.getName + " " + getLevelAsRoman(move.getMoveLevel) }
I just want to show the value in my html. How am I meant to do this? The above code gets the error
identifier expected but 'if' found.