Hi guys i have a little problem here and really dont know what's wrong with it . So today i tried to add some custom items but in the end i get some strange error what says : Cannot create item 0 , ItemTable: Highest used itemID : 9852 .
Here is all from error.log file
Jan 31, 2015 1:37:09 AM net.sf.l2j.gameserver.skills.DocumentItem parseDocument
WARNING: Cannot create item 0
java.lang.NullPointerException
at net.sf.l2j.gameserver.skills.DocumentItem.parseItem(DocumentItem.java:95)
at net.sf.l2j.gameserver.skills.DocumentItem.parseDocument(DocumentItem.java:78)
at net.sf.l2j.gameserver.skills.DocumentBase.parse(DocumentBase.java:120)
at net.sf.l2j.gameserver.skills.SkillsEngine.loadItems(SkillsEngine.java:107)
at net.sf.l2j.gameserver.datatables.ItemTable.load(ItemTable.java:162)
at net.sf.l2j.gameserver.datatables.ItemTable.<init>(ItemTable.java:155)
at net.sf.l2j.gameserver.datatables.ItemTable$SingletonHolder.<clinit>(ItemTable.java:383)
at net.sf.l2j.gameserver.datatables.ItemTable.getInstance(ItemTable.java:135)
at net.sf.l2j.gameserver.GameServer.<init>(GameServer.java:160)
at net.sf.l2j.gameserver.GameServer.main(GameServer.java:385)
package what i'm using is trace editon Based on aCis revision: 315 if that help...
I really hope someone can help me with it didn't find anything near about this error in google.
and how about this code i found it in itemtable.java it looks a bit wierd for me :
/**
* Returns instance of ItemTable
* @return ItemTable
*/
public static ItemTable getInstance()
{
return SingletonHolder._instance;
}
/**
* Returns a new object Item
* @return
*/
public Item newItem()
{
return new Item();
}
/**
* Constructor.
*/
protected ItemTable()
{
_armors = new HashMap<>();
_etcItems = new HashMap<>();
_weapons = new HashMap<>();
load();
}
private void load()
{
int highest = 0;
for (L2Item item : SkillsEngine.getInstance().loadItems())
{
if (highest < item.getItemId())
highest = item.getItemId();
if (item instanceof L2EtcItem)
_etcItems.put(item.getItemId(), (L2EtcItem) item);
else if (item instanceof L2Armor)
_armors.put(item.getItemId(), (L2Armor) item);
else
_weapons.put(item.getItemId(), (L2Weapon) item);
}
buildFastLookupTable(highest);
}
/**
* Builds a variable in which all items are putting in in function of their ID.
* @param size
*/
private void buildFastLookupTable(int size)
{
// Create a FastLookUp Table called _allTemplates of size : value of the highest item ID
_log.info("ItemTable: Highest used itemID : " + size);
_allTemplates = new L2Item[size + 1];
// Insert armor item in Fast Look Up Table
for (L2Armor item : _armors.values())
_allTemplates[item.getItemId()] = item;
// Insert weapon item in Fast Look Up Table
for (L2Weapon item : _weapons.values())
_allTemplates[item.getItemId()] = item;
// Insert etcItem item in Fast Look Up Table
for (L2EtcItem item : _etcItems.values())
_allTemplates[item.getItemId()] = item;
}
/**
* Returns the item corresponding to the item ID
* @param id : int designating the item
* @return L2Item
*/
public L2Item getTemplate(int id)
{
if (id >= _allTemplates.length)
return null;
return _allTemplates[id];
}
DISCORD :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
Question
millers
Hi guys i have a little problem here and really dont know what's wrong with it . So today i tried to add some custom items but in the end i get some strange error what says : Cannot create item 0 , ItemTable: Highest used itemID : 9852 .
Here is all from error.log file
package what i'm using is trace editon Based on aCis revision: 315 if that help...
Item what i tried to add was
I really hope someone can help me with it didn't find anything near about this error in google.
and how about this code i found it in itemtable.java it looks a bit wierd for me :
Edited by millers5 answers to this question
Recommended Posts