Jump to content

[HELP] Making script go task to task instead of looping over first two


Recommended Posts

Posted
24 minutes ago, ItPoke said:

I just told you to clean the code so you can make sure that you have your brackets correct....
 


if (widget == null || !widget.interact()) {
    return;
  } // <- Why is there a curly bracket here?!
}

 

I've back tracked and started going back through cleaning things up was just wondering why I get "Multiple markers at this line
    - widget cannot be resolved to a 
     variable"  
When I add: 

if (widget == null || !widget.interact()) {

 Like I said I'm really new to this so if this is a stupid question I apologize in advanced lol just eager to learn and appreciate you taking the time to look at this. 

 

you-da-real-mvp.jpg

Posted
5 hours ago, Mr_MilkysButler said:

Can you provide your log?

[ERROR][Bot #1][02/02 10:27:58 PM]: Error in bot executor or from Error class (and not Exception)!
java.lang.Error: Unresolved compilation problems: 
    widget cannot be resolved to a variable
    widget cannot be resolved
    removeMenu cannot be resolved to a variable
    removeMenu cannot be resolved
    The method interact() is undefined for the type Settings

    at oaklarders.Oaklarders.onLoop(Oaklarders.java:36)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sh:238)
    at java.lang.Thread.run(Unknown Source)
 

Posted
On 2/2/2019 at 11:22 AM, Spider Scripts said:

maybe just try to use if and else statements

so


if(has planks)
   build larders
else if(condition 2)
   remove larders
else if(condition 3)
   interact with butler

 

Gonna give this a shot. In my head this makes sense and would shorten the script down to a lot less lines and BS. The hardest one to figure out for me would be how to call butler with settings<house<call servant. Will give it a go though!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...