So here is my code which is similar to the one on page 92. It isn’t printing the error message to the console for some reason. I am not sure if this because of the main function in Game.kt. I believe it isn’t because I named the function and called it from main in game.kt and still the same problem. Anyone know why by chance?
fun main() {
var beverage = readLine()
if(beverage!=null){
beverage = beverage.capitalize()
print(beverage)
} else{
println("Can't do that without crashing - beverage was null!")
}
}