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
  • Good 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

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