String Reference instead of Text when I Run Game.kt


#1

Hi all, when I run after the refactor in Ch 12 i get this output:

A glass of Fireball springs into existence. (x2)
(Aura: com.bignerdranch.nyethack.Player@4dd8dc3.auraColor) (Blessed: YES)
com.bignerdranch.nyethack.Player@4dd8dc3.name com.bignerdranch.nyethack.Player@4dd8dc3.healthStatus

Why am I getting this reference instead of the regular output? I probably passed over it in the book somewhere, but I can’t find it. If anyone could point out the solution that would be appreciated.


#2

I caught my mistake: I forgot to put curly braces around the player elements in printPlayerStatus.