Jump to content

onMessage() not firing


Recommended Posts

Posted
9 minutes ago, ThatGamerBlue said:

My onMessage method isn't firing.


@Override
	public void onMessage(Message m) {
		log("onMessage 1");
		fr.onMessage(m);
	}

Nothing gets printed to log on any form of message in the chatbox (game, player, trade etc)

??

What is fr.onMessage?

Where are you declaring the method?

Posted (edited)
2 hours ago, Explv said:

??

What is fr.onMessage?

Where are you declaring the method?

sry, forgot to mention, fr is an instance of the friends api i wrote, this was the easiest way i could think of to pass the message to update its status, declaring the method in the op in the class extending script

2 hours ago, The Undefeated said:

If you wanna log the message you should do this:


	public void onMessage(Message m) {
		log(m.getMessage());
	}

 

i tried this, still nothing gets logged, i think the method isnt even getting called

Edited by ThatGamerBlue
Posted
9 hours ago, ThatGamerBlue said:

sry, forgot to mention, fr is an instance of the friends api i wrote, this was the easiest way i could think of to pass the message to update its status, declaring the method in the op in the class extending script

i tried this, still nothing gets logged, i think the method isnt even getting called

The friends chat has to be included in the normal chat itself, not above the chat. There's an option for that.

Posted
3 hours ago, The Undefeated said:

The friends chat has to be included in the normal chat itself, not above the chat. There's an option for that.

should've been more specific, in the api i'm listening for the message "Unable to add friend - unknown player." that the game sends in the "game" tab, but i found somebody else's api that does what i want using widgets rather than my pixel area clicking

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...