You are not sending the parameters in. Do: c.getPA().c2k(c, amount);
|
Hey i've messed around with clickingbuttons and playerassistant and i made a public void here with (Client c, int amount)
And now it has this error when im doing c.getPA().c2k(); on clickingbuttons.
The public void is called like that on playerassistant:
public void c2k(Client c, int amount) {
//W.e it does, it has no errors nor etc.
}
Then when i compile i got this error:
Any idea?Code:source\server\model\players\packets\ClickingButtons.java:3587: error: method c2k in class PlayerAssistant cannot be applied to given types; c.getPA().c2k(); ^ required: Client,int found: no arguments
Please tell me the fix
You are not sending the parameters in. Do: c.getPA().c2k(c, amount);
C2k method @ playerAssistant.java:
ClickingButtons.java part:Code:public void c2k(Client c, int amount) { String amt = Integer.toString(amount); if(c.getItems().playerHasItem(989, amount)) { c.getItems().deleteItem(989, amount); c.getItems().addItem(5021, amount); c.sendMessage("You've exchanged your "+amt+" crystal keys into "+amt+" 1b tickets."); } else { c.sendMessage("You don't have any ckeys to exchange"); } if(c.getItems().freeSlots() == 0) { c.sendMessage("Not enough space on your inventory"); } }
Code:if (c.dialogueAction == 600) { c.getPA().c2k(c, amount); }
You need to learn some Basic Java mate
Lesson: Language Basics (The Java™ Tutorials > Learning the Java Language)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |