Jump to content

Shop name keeping on screen


Recommended Posts

Hello dev, i have problem with code in python client, when i see some shop on map, then after teleport shop name keeps on screen like screen

58c84822520d5_Beznzvu.png.59a44e82dfeeb6e55d0586fa19a1ba1a.png

Sysser:

0314 20:40:08235 :: Traceback (most recent call last):

0314 20:40:08235 ::   File "uiPrivateShopBuilder.py", line 163, in OnUpdate

0314 20:40:08235 :: TypeError
0314 20:40:08235 :: : 
0314 20:40:08235 :: 'NoneType' object is not iterable
0314 20:40:08235 :: 

0314 20:40:08252 :: Traceback (most recent call last):

Python code:

	def OnUpdate(self):
		if not self.vid:
			return	
		if systemSetting.IsShowSalesText():
		
			if chr.GetInstanceType(self.vid) not in [chr.INSTANCE_TYPE_PLAYER,chr.INSTANCE_TYPE_NPC]:
				self.Hide()
			if GetShopNamesRange() == 1.000:
				self.Show()
				(x, y) = chr.GetProjectPosition(self.vid, 220)
				self.SetPosition(x - self.GetWidth() / 2, y - self.GetHeight() / 2)
			else:
				LIMIT_RANGE = abs(constInfo.SHOPNAMES_RANGE * GetShopNamesRange())
				(to_x, to_y, to_z) = chr.GetPixelPosition(self.vid)
				(my_x, my_y, my_z) = player.GetMainCharacterPosition()
				if abs(my_x - to_x) <= LIMIT_RANGE and abs(my_y - to_y) <= LIMIT_RANGE:
					(x, y) = chr.GetProjectPosition(self.vid, 220)
					self.SetPosition(x - self.GetWidth() / 2, y - self.GetHeight() / 2)
					self.Show()
				else:
					self.Hide()
					self.SetPosition(-10000, 0)
		else:
			for key in g_privateShopAdvertisementBoardDict.keys():
				if player.GetMainCharacterIndex() == key:
					g_privateShopAdvertisementBoardDict[key].Show()
					x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220)
					g_privateShopAdvertisementBoardDict[key].SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2)
				else:
					g_privateShopAdvertisementBoardDict[key].Hide()

Line which should be bad is :

(to_x, to_y, to_z) = chr.GetPixelPosition(self.vid)

Please can somebody help me? Thank you.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 11

      Metin2 Closed Beta Content (2003-2004)

    2. 11

      Metin2 Closed Beta Content (2003-2004)

    3. 0

      Football Ground

    4. 11

      Metin2 Closed Beta Content (2003-2004)

    5. 0

      Error compile binary Zentoria2

    6. 11

      Metin2 Closed Beta Content (2003-2004)

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.