ThatGamerBlue Posted November 7, 2017 Posted November 7, 2017 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)
Explv Posted November 7, 2017 Posted November 7, 2017 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?
dreameo Posted November 7, 2017 Posted November 7, 2017 lol im guessing fr is the instance of the class and hes calling onMessage?
The Undefeated Posted November 7, 2017 Posted November 7, 2017 If you wanna log the message you should do this: public void onMessage(Message m) { log(m.getMessage()); }
ThatGamerBlue Posted November 7, 2017 Author Posted November 7, 2017 (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 November 7, 2017 by ThatGamerBlue
The Undefeated Posted November 8, 2017 Posted November 8, 2017 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.
ThatGamerBlue Posted November 8, 2017 Author Posted November 8, 2017 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
Team Cape Posted November 8, 2017 Posted November 8, 2017 10 hours ago, ThatGamerBlue said: 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 fr.log(m.getMessage());