Problème java

alex881233456789 Messages postés 30 Statut Membre -  
choubaka Messages postés 5534 Date d'inscription   Statut Modérateur Dernière intervention   -
Bonjour,

J'ai un problème de compilation en java. mon compileur me répond ceci.

/tmp/jc_12698/firebotncut.java:41: expected
Inventory.get(briquet). ( clickMouse);
^
Que dois-je changer?

merci, alex881233456789

5 réponses

  1. unminecraftien Messages postés 80 Statut Membre 21
     
    Salut

    Tu codes un mod pour minecraft ?

    Tu peux poster le code en entier stp, je peux pas t'aider sinon...
    0
  2. alex881233456789 Messages postés 30 Statut Membre
     
    oui voìla:

    import java.awt.Color;
    import java.awt.Font;
    import java.awt.Graphics;

    import com.rsbuddy.event.listeners.PaintListener;
    import com.rsbuddy.script.ActiveScript;
    import com.rsbuddy.script.methods.Bank;
    import com.rsbuddy.script.methods.Environment;
    import com.rsbuddy.script.methods.Inventory;

    @Manifest(authors={"Alexandre"}, name="firebotncut", keywords={"firemaking, making, ash, woodcutting, money"}, version=0.5, description="Start anywhere and you will get bring to the closer yew, maple, tree or other tree")
    public class firebotncut extends ActiveScript implements PaintListener{

    //Script variables
    private final int yew = 1515;

    private void getyew() {
    int startCount = Inventory.getCount();
    int endCount = startCount + 1;

    if (Objects.getNearest(yew) != null) {
    log("We found some yew!");
    Objects.getNearest(yew).interact("chop down yew");
    for (int i = 0; i < 10 && endCount != Inventory.getCount(); i++) {
    sleep(800, 1200);
    }
    }
    }

    //Script variables
    private final int briquet = 590;

    private void getbriquet() {
    int startCount = Inventory.getcount();
    int endCount = startCount + 1;

    if (Inventory.contains(yew) ) {
    log("Fire!");
    Inventory.get(yew).interact("use");
    Inventory.get(briquet).(onClick);
    for (int i = 27; i < 10 && endCount != Inventory.getCount(); i++) {
    sleep(800, 1200);
    }
    }
    }
    //Script variables
    private final int ashId = 592;

    //Debug variables
    private String status = "Unknown";

    //Paint variables
    final Font comicPlain10 = new Font("Comic Sans MS", Font.PLAIN, 10);
    final Color black = new Color(0, 0, 0);

    @Override
    public int loop() {
    status = "Looping";
    if (Bank.isOpen()) {
    if (Inventory.contains(ashId)) {
    status = "Depositing";
    Bank.depositAll();
    }
    else if (!Inventory.contains(ashId)) {
    status = "Closing bank";
    Bank.close();
    }
    }
    else if (!Bank.isOpen()) {
    if (Inventory.isFull()) {
    status = "Opening bank";
    Bank.open();
    }
    else if (!Inventory.isFull()) {
    status = "Getting ashes";
    }
    }
    return 0;
    }

    private void getAshes() {
    int startCount = Inventory.getCount();
    int endCount = startCount + 1;

    if (GroundItems.getNearest(ashId) != null) {
    status = "Taking ashes";
    GroundItems.getNearest(ashId).interact("Take");
    for (int i = 0; i < 10 && endCount != Inventory.getCount(); i++) {
    status = "Sleeping";
    sleep(800, 1200);
    }
    }
    }

    public boolean onStart() {
    status = "Starting up";
    log("If you find any bugs please message me!");
    return true;
    }

    public void onFinish() {
    status = "Finishing";
    log("Thanks for using my script!");
    Environment.saveScreenshot(true);
    }

    @Override
    public void onRepaint(Graphics g) {
    g.setFont(comicPlain10);
    g.setColor(black);

    g.drawString("Status: " + status, 20, 400);
    }
    }
    0
  3. unminecraftien Messages postés 80 Statut Membre 21
     
    Essayes de remplacer à la ligne 41 :

    Inventory.get(briquet).(onClick);

    par :

    Inventory.get(briquet).(clickMouse);
    0
  4. alex881233456789 Messages postés 30 Statut Membre
     
    Désolé, ca marche pas
    0
  5. Vous n’avez pas trouvé la réponse que vous recherchez ?

    Posez votre question
  6. choubaka Messages postés 5534 Date d'inscription   Statut Modérateur Dernière intervention   2 113
     
    bonjour

    Je ne vois pas de constructeur dans ta classe
    -1