1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question First Bot, geting Errors. need help.

Discussion in 'Developer Support' started by BinaryAntidote, Jun 27, 2017.

Tags:
  1. BinaryAntidote

    Joined:
    Feb 25, 2017
    Messages:
    42
    Likes Received:
    4
    Hello guys

    I just started to code my own Bot, a simpel Tree chopper it workd fine for few minutes and than stoped after that every time i try to run it i get this message:

    java.lang.UnsupportedOperationException: Only a Thread within a bot's ThreadGroup may eavesdrop on the game client. Current Thread=Thread[pool-5-thread-1,5,[t-g]33364 - Servan's Powerchopper]
    at nul.IiIIIiiIiIiii.this(twb:199)
    at com.runemate.game.api.hybrid.Environment.getGameType(kfc:6)
    at com.runemate.game.api.hybrid.Environment.isOSRS(kfc:164)
    at nul.IIiIiiiIIIiII.this(gza:108)
    at nul.IIiIiiiIIIiII.<init>(gza:50)
    at com.runemate.game.api.script bot.framework.rws.WebServices.<init>(tgb:23)
    at com.runemate.game.api.script bot.framework.rws.WebServices.associate(tgb:205)
    at com.runemate.game.api.script bot.framework.AbstractBot.this(geb:3025)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)

    could some one tell me what i am doing wrong?
    i can post the sourceCode if its needed.
     
  2. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
    You're trying to use methods that can only be used on the bot platform. Most likely you're doing something like checking gametype or querying for something inside your UI controller or something like that. Posting the source would definitely help determining the exact problem.
     
  3. BinaryAntidote

    Joined:
    Feb 25, 2017
    Messages:
    42
    Likes Received:
    4
    Here is the source code : Woodcut.rar

    fyi = i used Snufalufugus Tutorial video, to code it.
     
  4. Swatarinaess

    Swatarinaess Bot Consultant

    Joined:
    Nov 17, 2014
    Messages:
    282
    Likes Received:
    76
    Using;
    Code (Text):
    1. bot.getPlatform.invokeLater
    Will fix the problem. :)
     
  5. Savior

    Savior Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    You guys should really read the stack traces sometimes...
    @Bomber001 it's not your problem, it's a client issue.
     
    BinaryAntidote and sickness0666 like this.
  6. Swatarinaess

    Swatarinaess Bot Consultant

    Joined:
    Nov 17, 2014
    Messages:
    282
    Likes Received:
    76
    My bad. I assumed it was similar/same problem that someone in the slack chat had few days ago.
     
  7. Savior

    Savior Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    In general you guys are right obviously, but in this specific case it is not him causing the issue :)
     
    sickness0666 likes this.

Share This Page

Loading...