Jump to content

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


Imthabawse

Recommended Posts

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

Link to comment
Share on other sites

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)
 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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