- Joined
- May 27, 2016
- Messages
- 745
- Thread Author
- #1
I feel I have got everything down this time and I dont get any errors on my scripts but it wont print the Hello World for me after pressing play button on intellij it launches th development runemate window up and I see my tutorial bot so I boot that up and I get this error printed on intellij down below:
error log
script for hello world
Manifest
error log
JavaScript:
java.lang.UnsupportedOperationException: Only a Thread within a bot's ThreadGroup may eavesdrop on the game client. Current Thread=Thread[pool-4-thread-1,5,[t-g]436 - Tutorial Bot]
at nul.iIiIIIiiiiIi.for(pqb:138)
at com.runemate.game.api.hybrid.Environment.getGameType(emb:160)
at com.runemate.game.api.hybrid.Environment.isRS3(emb:194)
at nul.iiIIIIiIiiii.for(nab:75)
at nul.iiIIIIiIiiii.validate(nab:143)
at com.runemate.game.api.script.framework.LoopingBot.run(wxa:96)
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:745)
JavaScript:
java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[Debug] RuneMate Version: 2.4.18
[Debug] Java Version: 8u121 x86 (Oracle Corporation)
[Debug] Operating System: Windows 10 x64
Checking for a new game client every second for two minutes or until one is found.
Attempting to start official client. If it does not open shortly please do so manually.
Found a new game instance after 4 seconds.
java.lang.UnsupportedOperationException: Only a Thread within a bot's ThreadGroup may eavesdrop on the game client. Current Thread=Thread[pool-3-thread-1,2,[t-g]436 - Tutorial Bot]
at nul.iIiIIIiiiiIi.for(pqb:138)
at com.runemate.game.api.hybrid.Environment.getBot(emb:71)
at nul.iiiIiIiiiIii.run(pbb:147)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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:745)
SDK mode is intended for active bot development only. As such, there is a three hour runtime limit while in SDK mode for users who are not Bot Authors. If you are an aspiring Bot Author, please continue on and best of luck! The moment you publish your first bot this limit will be removed. If you are an end user please contact your bot provider and ask them to publish the bot via the Bot Store, so it can be reviewed for safety. For more information please visit <a href="https://www.runemate.com/community/threads/restrict-sdk-runtime-for-end-users.4277/">the discussion thread</a>.
00:00:00 [ DEBUG ] Logger Initialised - this log file can be found at C:\Users\Chris\RuneMate\logs\02-15 2 08 34 - Tutorial Bot.txt
[Caution: Performance Issue] Tutorial Bot is using the default loop delay of [200,400].
[Caution: Continued] It is HIGHLY suggested that you change this value within onStart(String... args) to prevent lag, resource waste, and to make your bots have more unique timings.
[Caution: Limited API usage] You're only using a small portion of the api, we recommend you look into some of our EventListeners such as the InventoryListener.
java.lang.UnsupportedOperationException: Only a Thread within a bot's ThreadGroup may eavesdrop on the game client. Current Thread=Thread[pool-4-thread-1,5,[t-g]436 - Tutorial Bot]
at nul.iIiIIIiiiiIi.for(pqb:138)
at com.runemate.game.api.hybrid.Environment.getGameType(emb:160)
at com.runemate.game.api.hybrid.Environment.isRS3(emb:194)
at nul.iiIIIIiIiiii.for(nab:75)
at nul.iiIIIIiIiiii.validate(nab:143)
at com.runemate.game.api.script.framework.LoopingBot.run(wxa:96)
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:745)
script for hello world
JavaScript:
package com.chris121.bots.tutorial_bot;
import com.runemate.game.api.script.framework.LoopingBot;
/**
* Created by Chris on 15/02/2017.
*/
public class TutorialBot extends LoopingBot {
private String output; //Declare our string
@Override
public void onLoop() {
setOutput("Hello World!"); //Assign the string a value using the below method
System.out.println(getOutput()); //Print the value of the string
setLoopDelay(1000);
}
public void setOutput (String string){
output = string;
}
public String getOutput(){
return output;
}
}
Manifest
JavaScript:
<manifest>
<main-class>com.chris121.bots.tutorial_bot.TutorialBot</main-class>
<name>Tutorial Bot</name>
<description>This is a test bot it test tests</description>
<version>.0.0.1</version>
<compatibility>
<game-type>RS3</game-type>
</compatibility>
<categories>
<catagory>MINING</catagory>
</categories>
</manifest>
Last edited: