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
  • Trying to create and use multiple classes


    Impensus

    Recommended Posts

    I am having issue trying to create multiple classes. I have my main class where all the decisions are made then classes such as banking, selling etc to deal with all the interactions. Below is my code

    import org.dreambot.api.Client;
    
    public class Banking extends Main {
        
    
            log("Banking, Inventory is full");
    
        if (Main.getInventory().isFull() && (getInventory().count("Coins") <= 59)) {
            log("Less than 60 coins, Not enough to return. Walking to the shops to sell lobsters");
            log("Walking to - Shop Location");
    
            if (!shopLoc.contains(getLocalPlayer())){
                getWalking().walk(shopLoc.getRandomTile());
            }
    
            if(shopLoc.contains(getLocalPlayer())){
                sellLobbies();
            }
    
        }

    I am getting 'cannot resolve symbol' errors on the methods such as getInventory and missing method body errors with the log bits.

    Is there any code that I can include within this or my main so the two are linked and share methods so i can call this class from my main.

    Thanks for any help.

    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.