tristano98 6 Posted November 15, 2020 Share Posted November 15, 2020 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 comment Share on other sites More sharing options...
Contributor TMP4 10989 Posted November 16, 2020 Contributor Share Posted November 16, 2020 (edited) 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 November 16, 2020 by TMP4 1 Link to comment Share on other sites More sharing options...
tristano98 6 Posted November 16, 2020 Author Share Posted November 16, 2020 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 comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now