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
  • sleepUntil(() -> ... not working ?


    Miammoai

    Recommended Posts

    Hello,

    I am a nub that just wanted to play with making my own script. I'm following the tutorials and all is fine until I use the "sleepUntil(() -> " function.

    I use eclipse and JRE 1.8.0_172. for some reason this is not working. Any tips ?

    Code:

    https://pastebin.com/A1tivDsU

     

    Compile errors:

    "Description    Resource    Path    Location    Type Syntax error on token(s), misplaced construct(s)    MainClass.java    /Woodcut/src    line 23    Java Problem"

    "Description    Resource    Path    Location    Type Syntax error on tokens, Expression expected instead    MainClass.java    /Woodcut/src    line 23    Java Problem"

     

    Any tips? for some reason this just won't compile (even trough I have copied it out of other working scripts).

     

    Thanks
     

    Link to comment
    Share on other sites

    7 minutes ago, zScorpio said:

    sleepUntil( ()-> Condition  , TIMEOUT_MILLISECONDS );

    sleepUntil(() -> !getLocalPlayer().isAnimating() , 15000);

    I am a complete noob at java programming but how does this not fit the "condition: part. The error mentions an int so should i cast it to a Boolean?

    getLocalPlayer().isAnimating() would return a true or false if I understand correctly. So how is this not a condition?

     

    http://prntscr.com/jkek0n

    http://prntscr.com/jkek97

    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.