Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

Evolution System -> invalid literal for int() with base 10: 'd'


blaxis

Question

Hello, I am having mirroring problem in evolution system.

 

#ifdef ENABLE_WEAPON_EVOLUTION_SYSTEM
		len = snprintf(itemlink, sizeof(itemlink), "item:%x:%x:%x:%x:%x:%d",
				pPlayerItem->vnum, pPlayerItem->flags,
				pPlayerItem->alSockets[0], pPlayerItem->alSockets[1], pPlayerItem->alSockets[2], pPlayerItem->evolution);
#else
		len = snprintf(itemlink, sizeof(itemlink), "item:%x:%x:%x:%x:%x",
				pPlayerItem->vnum, pPlayerItem->flags,
				pPlayerItem->alSockets[0], pPlayerItem->alSockets[1], pPlayerItem->alSockets[2]);
#endif

When I use this code, it gives the "syserr" error I specified. But "#else" is no problem.

 

And uitooltip.py:

	def SetHyperlinkItem(self, tokens):
		minTokenCount = 4 + player.METIN_SOCKET_MAX_NUM
		maxTokenCount = minTokenCount + 2 * player.ATTRIBUTE_SLOT_MAX_NUM
		if tokens and len(tokens) >= minTokenCount and len(tokens) <= maxTokenCount:
			head, vnum, flag = tokens[:3]
			itemVnum = int(vnum, 16)
			metinSlot = [int(metin, 16) for metin in tokens[3:6]]
			if app.ENABLE_WEAPON_EVOLUTION_SYSTEM:
				evolution = int(tokens[6])

			rests = tokens[6:]
			if rests:
				attrSlot = []

				rests.reverse()
				while rests:
					key = int(rests.pop(), 16)
					if rests:
						val = int(rests.pop())
						attrSlot.append((key, val))

				attrSlot += [(0, 0)] * (player.ATTRIBUTE_SLOT_MAX_NUM - len(attrSlot))
			else:
				attrSlot = [(0, 0)] * player.ATTRIBUTE_SLOT_MAX_NUM

			self.ClearToolTip()
			if app.ENABLE_WEAPON_EVOLUTION_SYSTEM:
				self.AddItemData(itemVnum, metinSlot, attrSlot, evolution, 1 )
			else:
				self.AddItemData(itemVnum, metinSlot, attrSlot)

			ItemToolTip.OnUpdate(self)

I will be grateful if you could help me.

Link to comment
Share on other sites

  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Days

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.