Jump to content
  • 0

BUG SHOP CLOSE


tristano98

Question

Hi guys, I have a problem with offline shops closing. When I close it, the store title remains..

Syserr
1115 08:41:02239 :: Traceback (most recent call last):

1115 08:41:02239 ::   File "uiOfflineShopBuilder.py", line 171, in OnUpdate

1115 08:41:02239 :: TypeError
1115 08:41:02239 :: : 
1115 08:41:02239 :: 'NoneType' object is not iterable
1115 08:41:02239 :: 
1115 08:41:02239 :: 

 

 

Spoiler

def OnUpdate(self):
        if (not self.vid):
            return

        if (systemSetting.IsShowSalesText() and systemSetting.IsShowOfflineShop()):
            if systemSetting.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 * systemSetting.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(-70, 0)
            name = chr.GetNameByVID(self.vid)
            if str(name) in constInfo.PAZAR_BAKILDI:
                if str(self.baslik).find("^") != -1:
                    self.textLine_Bakildi.SetText(str(constInfo.RENKLER["SARI"])+self.baslik[1:])
                else:
                    self.textLine_Bakildi.SetText(str(constInfo.RENKLER["SARI"])+self.baslik)
                self.textLine_Bakildi.Show()
                self.textLine.Hide()
            else:
                if str(self.baslik).find("^") != -1:
                    self.textLine.SetText(self.baslik[1:])
                    self.textLine.Show()
                    self.textLine_Bakildi.Hide()
                else:
                    self.textLine.SetText(self.baslik)
                    self.textLine.Show()
                    self.textLine_Bakildi.Hide()
        else:
            for key in g_offlineShopAdvertisementBoardDict.keys():
                g_offlineShopAdvertisementBoardDict[key].Hide()


    
 

Link to post

2 answers to this question

Recommended Posts

  • 0

You have some problem with g_offlineShopAdvertisementBoardDict. It can't iterate over the array.

Open up your tutorial and look for it, maybe you missed it when you implemented the offshop since it's saying NoneType.

 

If that's the case you missing this from the top of the file:

g_offlineShopAdvertisementBoardDict = {}

 

Edited by TMP4 (see edit history)
  • Lucky 1
Link to post
  • 0
2 hours ago, TMP4 said:

You have some problem with g_offlineShopAdvertisementBoardDict. It can't iterate over the array.

Open up your tutorial and look for it, maybe you missed it when you implemented the offshop since it's saying NoneType.

 

If that's the case you missing this from the top of the file:

g_offlineShopAdvertisementBoardDict = {}

 

thanks now i look in the tutorial

Link to post

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

    No registered users viewing this page.

  • Activity

    1. 7

      mobs/stone drop by level ?

    2. 31

      Metin2 Download Center - Backup Status

    3. 2

      Christmas 2020

    4. 0

      Weird Cryptopp Problem

    5. 0

      Hello i have error with skill!

    6. 1

      Gurgarath Sus

    7. 24
×
×
  • 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.