Jump to content
  • 0

Itemtable: Highest Used Itemid : 9852 Error Cannot Create Item 0 !


Question

Posted (edited)

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...

 

 

Item what i tried to add was 

Tried With id=9853 the same stoory ..

<item id='23569' name="Dynasty Leather Armor">
<set name="default_action" val="equip" />
<set name="armor_type" val="light" />
<set name="bodypart" val="fullarmor" />
<set name="crystal_type" val="s" />
<set name="crystal_count" val="870" />
<set name="material" val="leather" />
<set name="weight" val="5400" />
<set name="price" val="0" />
<set name="item_skill" val="11961-1" />
  <for>
    <add val='170' order='0x10' stat='pDef'/>
    <enchant val='0' order='0x0C' stat='pDef'/>
  </for>
</item>

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];
	}
	
Edited by millers

5 answers to this question

Recommended Posts

  • 0
Posted

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 .

 

 

Tried With id=9853 the same stoory ..

<item id='23569' name="Dynasty Leather Armor">
<set name="default_action" val="equip" />
<set name="armor_type" val="light" />
<set name="bodypart" val="fullarmor" />
<set name="crystal_type" val="s" />
<set name="crystal_count" val="870" />
<set name="material" val="leather" />
<set name="weight" val="5400" />
<set name="price" val="0" />
<set name="item_skill" val="11961-1" />
  <for>
    <add val='170' order='0x10' stat='pDef'/>
    <enchant val='0' order='0x0C' stat='pDef'/>
  </for>
</item>

I really hope someone can help me with it didn't find anything near about this error in google.

<item id='23569' name="Dynasty Leather Armor"> why use '' and not ""

try with that

<item id="23569" name="Dynasty Leather Armor">

  • 0
Posted

<item id='23569' name="Dynasty Leather Armor"> why use '' and not ""

try with that

<item id="23569" name="Dynasty Leather Armor"> 

Same story ! 

  • 0
Posted

What's 

parseItem(DocumentItem.java:95)

 ? You probably miss a parameter. Try to copy an existing similar item, and edit the parameters accordingly.

thanks man found the problem !

Guest
This topic is now closed to further replies.


  • Posts

    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • 我们正在寻找合作伙伴和账号供应商进行合作 我们愿意与以下约会服务的可靠账号供应商建立合作关系: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating 我们考虑长期合作、稳定的供应量以及互利共赢的合作条件。 如果您有任何合作提议,我们很乐意讨论具体细节。 请通过以下联系方式与我们联系。 ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock