You can't create a TNObject randomly. It must be done inside a channel because objects belong to channels.
If you want some "global" object used for communication, join a "global" channel first (Tnet 3 supports multiple channels). For example, use channel #1 for your chat.