Error says: None of the following functions can be called with the arguments supplied

Please someone help, the following code shows the above error, what should I do?

class  ChatMessage(val id: String, val text: String, val fromId: String, timestamp: Long) {
        constructor() : this(id: "", text: "", fromId: "", timestamp: -1)
    }

I am working with a project in which I need to listen to those objects from firebase

I think you simply need to use id = "" etc instead of id: "" because that is not valid Kotlin syntax

1 Like

Wow, great!! that just worked. Sorry, just that I am new in programing and Kotlin to be precise.
thanks oncemore kyay10…

1 Like