I noticed that this init is probably not called because I have print(monsterName) there but when I run the App it doesn‘t show any output. So I guess the problem is: init is not executed.
Post
Replies
Boosts
Views
Activity
well it is empty. How can I call the init of MonsterC?Thought it would be called when I initialised var monsterT
thanks I added it but it said MonsterObj must be Hashable. So I added Hashable to MonsterObjBut the list is still empty(updatet my code)
thanks for the reply.The output of the print statements showed me the following things:snapshot.value Optional()
value nil
value?[HP] nilAlso I added the other piece of code. The output was also 0