我會瘋了嗎?或者我需要更多的睡眠...可以annyone提供第二套眼睛嗎?1不== 1,布爾問題
boolean slotTypeMatch = false;
System.out.println("waiType: " + waiType);
if (waiType.equals("W")){
} else if(waiType.equals("A")){
itemFilename = MyServer.armorMap.get(waiId).getFilename();
System.out.println("endContainerSlot: " + endContainerSlot + ", getSlot: " + MyServer.weaponMap.get(waiId).getSlot());
if (endContainerSlot == MyServer.armorMap.get(waiId).getSlot()){
System.out.println("WHY DONT I MAKE IT HERE!!!!");
slotTypeMatch = true;
}
}
System.out.println("itemFilename: " + itemFilename);
System.out.println("slotTypeMatch: " + slotTypeMatch);
if (slotTypeMatch){
//not making it here, I must be going insane
這裏是我的控制檯輸出...我不知道這一點,我的生活......
waiType: A
endContainerSlot: 1, getSlot: 1
itemFilename: images/armor/armor_tunic.png
slotTypeMatch: false
編輯它們都詮釋
int endContainerSlot - com.jayavon.game.server.MyCommandHandler.run()
int com.jayavon.game.actualgame.Armor.getSlot()
他們是同一類型嗎? – Blender 2013-04-29 04:49:24
對不起,他們都是int – KisnardOnline 2013-04-29 04:50:10
endContainerSlot和getSlot的數據類型是什麼? – 2013-04-29 04:50:30