Jump to content
  • 0

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


millers

Question

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
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

Link to comment
Share on other sites

  • 0

What's 

parseItem(DocumentItem.java:95)

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

Link to comment
Share on other sites

  • 0

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 !

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Hello Friends . I would like to introduce that i have found a method to avoid league hwid ban ( van 152 ) you will get perma ban when detected only at the account you are using like before vanguard release with the method you can script or use the tools you want at many accs as you wish unstoppable without caring about headache or wasting time and energy of flashing bios reset your pc installing fresh windows and using spoofer to change your hardware infos to unlock the hwid ban i have tested it on 5 accs i got them perma banned for using third party tools but not a hwid ban at all hint : ppl regulary get hwid ban in 2nd ban after got banned once before as vanguard working like that only 1 chance free then hwid ban. its so easy to achieve if you are interested dm for details
    • Trustworthy person; hope you find what you're looking for!
    • Customs being added to systextures/animation/texture influences the increase in virtual ram by a very small amount, which means you won't have a headache in the future with critical error issues, unless it's a dubious custom, there are 2 custom weapon packs available for H5 that are "compromised", they didn't make a very good adaptation, one of the packages is the weapons from the goddess of destruction for H5, another is the hero weapons from the goddess of destruction for H5, avoid these customs for your H5 server if you see it on any forum.   Now coming back to your question; one thing that the NCSoft developers never did was add files to their system, probably because they were aware of what could happen when doing that, now think about one thing: the game's system retail itself is no more than 70MB, every time there was an update made by NCSoft they always added the equipment/items/cloaks etc. in their folders intended for that, so why do we do this? I still have my client containing a system with almost 1GB, 1-2h online is the time I can stay online before the ram memory limit, but I have already redone my entire client with customs being destined for textures/systexture/animations, almost all the customs that I had on that client containing a 1GB system I have on my current server, with the difference that I removed everything from the system and critical error is now nothing more than legends, my current server has a total of 220MB in the system folder And theoretically speaking, based on what I've seen, especially on many forums, I believe that the heavier the system folder is, the faster we accelerate the consumption of the client's virtual ram memory, causing countless different types of critical error in one short period of time, in many forums that I've seen on topics involving critical, the solution that stands out the most is about downloading a new clean "system"
    • Do you think that everything on the system is loaded regardless if you use it or not ? or even worst, are they loaded even if they exist as textures/meshes but not defined on the DAT files ?
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...