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
  • Try asking for help in the chatbox
  • quest isFinished() possibly broken


    yeeter01
     Share

    Recommended Posts

    Pretty sure getQuest().isFinished() is not working properly.  When feeding it a quest to check getting a lovely

    java.lang.ArrayIndexOutOfBoundsException: -1

    Tried assuring the quest tab was pulled up before the check etc.  My code snippet generating these errors
     

    			ArrayList<Quest> curCompletedQuest = new ArrayList<Quest>();
    			if (getTabs().open(Tab.QUEST) || getTabs().isOpen(Tab.QUEST)) {
    				for (Quest curQuest : Quest.values()) {
    					log("Completed Quest - " + getQuests().isFinished(curQuest));
    					
    					if (getQuests().isFinished(curQuest)) {
    						curCompletedQuest.add(curQuest);
    					}
    				}
    			}

    Attempted to just print all quest enums which worked properly but the moment isFinished is hit I get this trace

    java.lang.ArrayIndexOutOfBoundsException: -1
            at org.dreambot.api.wrappers.widgets.WidgetChild.getChild(WidgetChild.java:326)
            at org.dreambot.api.methods.widget.Widgets.getWidgetChild(Widgets.java:117)
            at org.dreambot.api.methods.quest.Quest.getWidgetChild(Quest.java:192)
            at org.dreambot.api.methods.quest.Quest.isFinished(Quest.java:205)
            at org.dreambot.api.methods.quest.Quests.isFinished(Quests.java:42)
            at scripts.scriptIamWorkingOn.src.Main.onLoop(Main.java:88)
            at org.dreambot.api.script.AbstractScript.run(AbstractScript.java:256)
            at java.lang.Thread.run(Unknown Source)

    Line 88 being the log message to print out completed quest.  Made a work around but still thought I was report to see if I just wrote something incorrectly or if this is just broke.

    Link to comment
    Share on other sites

    I couldn't get it to work either, I ended up using player settings to track the quest progress. At least I know it may actually be broken and I'm not just too stupid to get it to work. (Or we're both too stupid but I'll accept that too)

    Link to comment
    Share on other sites

    1 hour ago, Cystic said:

    I couldn't get it to work either, I ended up using player settings to track the quest progress. At least I know it may actually be broken and I'm not just too stupid to get it to work. (Or we're both too stupid but I'll accept that too)

    Lololol, yeah switched over to player settings as well but thought it was still worth reporting. 

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • 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.