September 2, 201510 yr Does it work lol? I am positive I have the code correctly, but it doesn't work. And the debug logger doesnt even log, which leads me to believe it isn't working atm. If I am doing something wrong please let me know! @Override public void onMessage(Message m) { Logger.GLOBAL_LOGGER.debug("" + m.getMessage() + " Type: " + m.getType().getId()); if (m.getType() == Message.MessageType.GAME) { if (m.getMessage().contains("cut the")) { Variables.cutGems++; } } } Thanks, Empathy
September 2, 201510 yr Author You can just use log("....") Can you post your imports? import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.empathy.skilling.crafting.gemcutting.data.Timer; import org.empathy.skilling.crafting.gemcutting.data.Variables; import org.empathy.skilling.crafting.gemcutting.gui.Gui; import org.empathy.skilling.crafting.gemcutting.nodehandler.Node; import org.empathy.skilling.crafting.gemcutting.nodes.BankNode; import org.empathy.skilling.crafting.gemcutting.nodes.CraftGem; import org.osbot.rs07.api.ui.Message; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.utility.Logger; I don't think I need to implement messageListener, due to it already being implemented in the Script class (alongside Painter and other classes, and my paint works). I am also not getting an errors in eclipse.
September 2, 201510 yr What's that logging code? Might it be throwing the error? Try surrounding all of it in a try-catch, and use the default osbot logger to log the error
September 2, 201510 yr Author What's that logging code? Might it be throwing the error? Try surrounding all of it in a try-catch, and use the default osbot logger to log the error There's no error. It just doesn't work.
September 2, 201510 yr There's no error. It just doesn't work. Are you certain of that, tho? It might be silently caught out back
Create an account or sign in to comment