Looking at the documentation for SmartFox, it appears that you have the event names wrong. That's why the compiler is complaining about the type
parameter being null
. SFSEvent.CONNECTION
, SFSEvent.ROOM_JOIN
, et al do not exist and are therefore null
.
You'll want to use the correct event names. SFSEvent.onConnection
, SFSEvent.onJoinRoom
, etc.