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
  • quest isFinished() possibly broken


    yeeter

    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

    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.