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
  • Gui not starting with script


    hitsuu

    Recommended Posts

    Posted

    http://pastebin.com/YBvya5wJ <-- script

    http://pastebin.com/3nCELiid <--- gui

     

    I'm probably just missing some initializer or something simple.. but I can't figure out what. I imported the gui into the script class using: 

    stateminerGUI gui = new stateminerGUI(this);

    gui.setVisible(true);

     

    Although I am missing the import of gui.GUI, not sure if that is relevant.

    Posted

    http://pastebin.com/YBvya5wJ <-- script

    http://pastebin.com/3nCELiid <--- gui

     

    I'm probably just missing some initializer or something simple.. but I can't figure out what. I imported the gui into the script class using:

    stateminerGUI gui = new stateminerGUI(this);

    gui.setVisible(true);

     

    Although I am missing the import of gui.GUI, not sure if that is relevant.

    Have you tried with the import? It is definitely necessary otherwise the script won't know what it's trying to do.

    Posted

    Have you tried with the import? It is definitely necessary otherwise the script won't know what it's trying to do.

    I tried adding import gui.GUI and "gui" was red and said it couldn't resolve it. It just wasn't available for import for some reason.

    Posted

    I tried adding import gui.GUI and "gui" was red and said it couldn't resolve it. It just wasn't available for import for some reason.

    The first term before the period is the package, so you'd put the package you have your GUI class in there. If you aren't using any packages, you could just import your GUI like

    import nameOfGuiClass;
    Posted

    The first term before the period is the package, so you'd put the package you have your GUI class in there. If you aren't using any packages, you could just import your GUI like

    import nameOfGuiClass;

    I'm completely unfamiliar with how to set up packages and classes appropriately, so I just have everything inside a "Miner" package right now. Also, I've tried import stateminerGUI.GUI; and import stateminerGUI; and neither work. Errors such as: Cannot resolve symbol 'GUI', Unused import statement.

    Posted

    Try import Miner.stateminerGUI. the syntax is import packagename.classname;

    import Miner.stateminerGUI;
    Cannot resolve symbol 'stateminerGUI'
    
    Posted

     

    import Miner.stateminerGUI;
    Cannot resolve symbol 'stateminerGUI'
    

    Post a screenshot of your project structure please

    Posted

    https://www.dropbox.com/s/l9m12czivgl9q6t/Screenshot%202015-11-20%2009.52.54.png?dl=0


    Post a screenshot of your project structure please

    https://www.dropbox.com/s/l9m12czivgl9q6t/Screenshot%202015-11-20%2009.52.54.png?dl=0


    • [ERROR]14:15:17: java.lang.IllegalArgumentException: dataModel must be non null at javax.swing.JList.(Unknown Source) at stateminer$stateminerGUI.(stateminer.java:223) at stateminer.onStart(stateminer.java:40) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:180) at java.lang.Thread.run(Unknown Source)   

    This is an error I'm getting when calling stateminerGUI in OnStart(); with

     

    stateminerGUI gui = new stateminerGUI(this);

    Posted

    It should probably also be noted that I've just included the class file of the GUI right into my script, and it is still not working.


    so.. with the help of @ I've narrowed down the issue to the two lines of code shown commented out in the picture, now if i could only figure out why :))

     

    pic1.jpg

    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.