我试图提出ClickingButtons案。 java要工作,但我正经历一个错误,它无法找到象征角色。 HasItem & freeSlots. 现在我尝试进口我的物品。 java 案卷,有公共 in子角色 HasItem & freeSlots, but after Save and codificationing it is still given the me the same wrong!
这是我在ClickingButtons的进口说明。 java:
import server.model.items.ItemAssistant;
这些是我的项目的公开部分:
public int freeSlots()
{
int freeS = 0;
for (int i=0; i < c.playerItems.length; i++){
if (c.playerItems[i] <= 0){
freeS++;
}
}
return freeS;
}
public boolean playerHasItem(int itemID, int amt, int slot) {
itemID++;
int found = 0;
if (c.playerItems[slot] == (itemID)) {
for (int i = 0; i < c.playerItems.length; i++) {
if (c.playerItems[i] == itemID) {
if(c.playerItemsN[i] >= amt) {
return true;
} else {
found++;
}
}
}
if(found >= amt) {
return true;
}
return false;
}
return false;
}
public boolean playerHasItem(int itemID, int amt) {
itemID++;
int found = 0;
for (int i = 0; i < c.playerItems.length; i++) {
if (c.playerItems[i] == itemID) {
if(c.playerItemsN[i] >= amt){
return true;
} else{
found++;
}
}
}
if(found >= amt) {
return true;
}
return false;
}
呼呼号为:
if (c.dialogueAction == 717)
{
if (freeSlots() > 0)
{
if (c.tempRune == 1)//air
{
if (c.omniQuest == 2)
{
if (c.getItems().playerHasItems(995,10000) && c.getItems().playerHasItems(556,10))
{
c.getItems().deleteItems(995,10000);
c.getItems().deleteItems(556,10);
c.getItems().addItems(13599, 1);
c.getDH().sendDialogues(749,57);
} else
if (!c.getItems().playerHasItems(995,10000))
{
c.getDH().sendDialogues(750, 57);
} else
if (!c.getItems().playerHasItems(556,10))
{
c.getDH().sendDialogues(751, 57);
}
} else
if (c.getItems().playerHasItems(995,20000) && c.getItems().playerHasItems(556,20))
{
c.getItems().deleteItems(995,20000);
c.getItems().deleteItems(556,20);
c.getItems().addItems(13599, 1);
c.getDH().sendDialogues(749,57);
} else
if (!c.getItems().playerHasItems(995,20000))
{
c.getDH().sendDialogues(750, 57);
} else
if (!c.getItems().playerHasItems(556,20))
{
c.getDH().sendDialogues(751, 57);
}
} else
if (c.tempRune == 6)//body
{
if (c.omniQuest == 2)
{
if (c.getItems().playerHasItems(995,10000) && c.getItems().playerHasItems(559,10))
{
c.getItems().deleteItems(995,10000);
c.getItems().deleteItems(559,10);
c.getItems().addItems(13604, 1);
c.getDH().sendDialogues(749,57);
} else
if (!c.getItems().playerHasItems(995,10000))
{
c.getDH().sendDialogues(750, 57);
} else
if (!c.getItems().playerHasItems(559,10))
{
c.getDH().sendDialogues(751, 57);
}
} else
if (c.getItems().playerHasItems(995,20000) && c.getItems().playerHasItems(559,20))
{
c.getItems().deleteItems(995,20000);
c.getItems().deleteItems(559,20);
c.getItems().addItems(13604, 1);
c.getDH().sendDialogues(749,57);
} else
if (!c.getItems().playerHasItems(995,20000))
{
c.getDH().sendDialogues(750, 57);
} else
if (!c.getItems().playerHasItems(559,20))
{
c.getDH().sendDialogues(751, 57);
}
} else
if (c.tempRune == 13)//astral
{
if (c.omniQuest == 2)
{
if (c.getItems().playerHasItems(995,10000) && c.getItems().playerHasItems(9075,10))
{
c.getItems().deleteItems(995,10000);
c.getItems().deleteItems(9075,10);
c.getItems().addItems(13611, 1);
c.getDH().sendDialogues(749,57);
} else
if (!c.getItems().playerHasItems(995,10000))
{
c.getDH().sendDialogues(750, 57);
} else
if (!c.getItems().playerHasItems(9075,10))
{
c.getDH().sendDialogues(751, 57);
}
} else
if (c.getItems().playerHasItems(995,20000) && c.getItems().playerHasItems(9075,20))
{
c.getItems().deleteItems(995,20000);
c.getItems().deleteItems(9075,20);
c.getItems().addItems(13611, 1);
c.getDH().sendDialogues(749,57);
} else
if (!c.getItems().playerHasItems(995,20000))
{
c.getDH().sendDialogues(750, 57);
} else
if (!c.getItems().playerHasItems(9075,20))
{
c.getDH().sendDialogues(751, 57);
}
}
} else
{
c.getDH().sendDialogues(752, 57);
c.tempRune = 0;
}
}
另外,进口目录也是正确的。
为什么没有工作?