Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Script pops up in local scripts but does not run


    Pelli

    Recommended Posts

    Its a fairly short script, building settings are the same as other scripts i made. However this script won't run for some reason, this is the full code:

     

    https://pastebin.com/UVZi1q76

     

    -Manifest is filled out

    -No compiling errors

     

    -Building output (using NetBeans):

    clean:
    init:
    deps-jar:
    Created dir: C:\Users\***\Documents\NetBeansProjects\AmuletMaker\build
    Updating property file: C:\Users\***\Documents\NetBeansProjects\AmuletMaker\build\built-jar.properties
    Created dir: C:\Users\***\Documents\NetBeansProjects\AmuletMaker\build\classes
    Created dir: C:\Users\***\Documents\NetBeansProjects\AmuletMaker\build\empty
    Created dir: C:\Users\***\Documents\NetBeansProjects\AmuletMaker\build\generated-sources\ap-source-output
    Compiling 1 source file to C:\Users\***\Documents\NetBeansProjects\AmuletMaker\build\classes
    compile:
    Copying 1 file to C:\Users\***\Documents\NetBeansProjects\AmuletMaker\build
    Copy libraries to C:\Users\***\DreamBot\Scripts\lib.
    Building jar: C:\Users\***\DreamBot\Scripts\AmuletMaker.jar
    To run this application from the command line without Ant, try:
    java -jar "C:\Users\***\DreamBot\Scripts\AmuletMaker.jar"
    jar:
    BUILD SUCCESSFUL (total time: 1 second)

     

    Link to comment
    Share on other sites

    Try running the client through cmd and to see what kind of error pops up.

     

    Now my scripts don't show up anymore too, this is what pops up when clicking "refresh" to refresh local scripts: 

     

    Edit: this pops up when i open "Local Scripts" 

     

     

    Exception in thread "Thread-21" java.lang.ClassFormatError: Field "1" in class 0/1/7 has illegal signature "L0/1/0R;"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.dreambot.api.script.loader.LocalLoader.loadJar(LocalLoader.java:141)
    at org.dreambot.api.script.loader.LocalLoader.traverse(LocalLoader.java:93)
    at org.dreambot.api.script.loader.LocalLoader.traverse(LocalLoader.java:83)
    at org.dreambot.api.script.loader.LocalLoader.load(LocalLoader.java:60)
    at org.dreambot.api.script.loader.LocalLoader.(LocalLoader.java:35)
    at org.dreambot.1.1.0.1.4.2(4.java:561)
    at org.dreambot.1.1.0.1.4.0l(4.java:556)
    at org.dreambot.1.1.0.1.4.5(4.java:550)
    at org.dreambot.1.1.0.1.4.0a(4.java:282)
    at org.dreambot.1.1.0.1.4.2(4.java:98)
    at java.lang.Thread.run(Unknown Source)
    
    Exception in thread "Thread-22" java.lang.NoClassDefFoundError: Could not initialize class org.dreambot.api.script.loader.LocalLoader
    at org.dreambot.1.1.0.1.4.2(4.java:561)
    at org.dreambot.1.1.3.3.0.5.1(5.java:140)
    at java.lang.Thread.run(Unknown Source)

     

     

     

    This when I try and refresh the scripts:

     

     

    Exception in thread "Thread-31" java.lang.NoClassDefFoundError: Could not initialize class org.dreambot.api.script.loader.LocalLoader
    at org.dreambot.1.1.0.1.4.2(4.java:561)
    at org.dreambot.1.1.0.1.4.7(4.java:424)
    at java.lang.Thread.run(Unknown Source)

     

     

    Link to comment
    Share on other sites

    Now my scripts don't show up anymore too, this is what pops up when clicking "refresh" to refresh local scripts: 

     

    Edit: this pops up when i open "Local Scripts" 

     

     

    Exception in thread "Thread-21" java.lang.ClassFormatError: Field "1" in class 0/1/7 has illegal signature "L0/1/0R;"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.dreambot.api.script.loader.LocalLoader.loadJar(LocalLoader.java:141)
    at org.dreambot.api.script.loader.LocalLoader.traverse(LocalLoader.java:93)
    at org.dreambot.api.script.loader.LocalLoader.traverse(LocalLoader.java:83)
    at org.dreambot.api.script.loader.LocalLoader.load(LocalLoader.java:60)
    at org.dreambot.api.script.loader.LocalLoader.(LocalLoader.java:35)
    at org.dreambot.1.1.0.1.4.2(4.java:561)
    at org.dreambot.1.1.0.1.4.0l(4.java:556)
    at org.dreambot.1.1.0.1.4.5(4.java:550)
    at org.dreambot.1.1.0.1.4.0a(4.java:282)
    at org.dreambot.1.1.0.1.4.2(4.java:98)
    at java.lang.Thread.run(Unknown Source)
    
    Exception in thread "Thread-22" java.lang.NoClassDefFoundError: Could not initialize class org.dreambot.api.script.loader.LocalLoader
    at org.dreambot.1.1.0.1.4.2(4.java:561)
    at org.dreambot.1.1.3.3.0.5.1(5.java:140)
    at java.lang.Thread.run(Unknown Source)

     

     

     

    This when I try and refresh the scripts:

     

     

    Exception in thread "Thread-31" java.lang.NoClassDefFoundError: Could not initialize class org.dreambot.api.script.loader.LocalLoader
    at org.dreambot.1.1.0.1.4.2(4.java:561)
    at org.dreambot.1.1.0.1.4.7(4.java:424)
    at java.lang.Thread.run(Unknown Source)

     

     

    Do you know which script is causing it? If not, remove them one by one to find it out.

    Link to comment
    Share on other sites

    Do you know which script is causing it? If not, remove them one by one to find it out.

     

    Yes, I tested all scripts and they are working, except this one :).

     

    The building options in my IDE automatically copied client.jar library along with my script into the script folder. Now I only put the script's jar in there and the error has changed: 

     

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

            at main.Main.<init>(Main.java:23)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at java.lang.Class.newInstance(Unknown Source)
            at org.dreambot.api.script.ScriptManager.start(ScriptManager.java:75)
            at org.dreambot.1.1.0.1.4.1(4.java:189)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$500(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)

     
    I think it gives an error (nullpointer exception) on my code on Line 23 which is the following:
    private final int startingLevel = getSkills().getRealLevel(Skill.CRAFTING);
    

    Edit #2: when deleting this line of code the script runs fine, I'm guessing the getSkills() method returned null for some reason

    Link to comment
    Share on other sites

    Yes, I tested all scripts and they are working, except this one :).

     

    The building options in my IDE automatically copied client.jar library along with my script into the script folder. Now I only put the script's jar in there and the error has changed: 

     

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

            at main.Main.<init>(Main.java:23)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at java.lang.Class.newInstance(Unknown Source)
            at org.dreambot.api.script.ScriptManager.start(ScriptManager.java:75)
            at org.dreambot.1.1.0.1.4.1(4.java:189)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$500(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)

     
    I think it gives an error (nullpointer exception) on my code on Line 23 which is the following:
    private final int startingLevel = getSkills().getRealLevel(Skill.CRAFTING);
    

    Edit #2: when deleting this line of code the script runs fine, I'm guessing the getSkills() method returned null for some reason

    It may be an issue with grabbing the skill level at run time or if the client is logged out. Try grabbing the level in a statement that checks the game is logged in. Good job on figuring it out.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.