Jump to content
External pictures are being replaced... ×
×
×
  • Create New...
  • 0

Shop name keeping on screen


mafianekcek

Question

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

  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

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
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.