Natox 18 Posted March 26, 2020 Share Posted March 26, 2020 Hello, I installed the official channelSwitcher system but I have this error. Can someone help me ? Sysserr client : 0326 02:38:21298 :: Traceback (most recent call last): 0326 02:38:21298 :: File "game.py", line 2518, in RefreshChannel 0326 02:38:21298 :: TypeError 0326 02:38:21298 :: : 0326 02:38:21298 :: not all arguments converted during string formatting 0326 02:38:21298 :: Thanks. Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 copy in game.py the RefreshChannel function and paste Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 (edited) def RefreshChannel(self, channel): channelName = "" serverName = serverInfo.REGION_DICT[0][self.GetServerID()]["name"] if channel in serverInfo.REGION_DICT[0][self.GetServerID()]["channel"]: channelName = serverInfo.REGION_DICT[0][self.__GetServerID()]["channel"][int(channel)]["name"] elif channel == 99: channelName = "Special CH" else: channelName = "Unknow CH" net.SetServerInfo("%s, %s" % (serverName,channelName)) if self.interface: self.interface.wndMiniMap.serverInfo.SetText(net.GetServerInfo()) chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (channel)) app.ChangeTitle(net.GetServerInfo()) Edited March 26, 2020 by Natox Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 send me pls game.py https://pastebin.com/ And do you using CH marker? ex.: XY MT2 - Channel X Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 (edited) https://pastebin.com/7bgUA5c3 What is a "Ch maker" ? Edited March 26, 2020 by Natox Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 I need this text localeInfo.MOVE_CHANNEL_NOTICE Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 (edited) MOVE_CHANNEL_NOTICE channel notice in locale_game.txt Edited March 26, 2020 by Natox Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 yes i know But i need this text from locale_game.txt Cuz your error is this text Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 i have edit Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 Because INT and STR files %s or %d error I think your locale_game have %s and need %d Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 (edited) 0326 14:08:25574 :: Traceback (most recent call last): 0326 14:08:25574 :: File "game.py", line 2520, in RefreshChannel 0326 14:08:25574 :: AttributeError 0326 14:08:25574 :: : 0326 14:08:25574 :: 'module' object has no attribute 'ChangeTitle' 0326 14:08:25574 :: edit Edited March 26, 2020 by Natox Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 Quote def RefreshChannel(self, channel): channelName = "" serverName = serverInfo.REGION_DICT[0][self.GetServerID()]["name"] if channel in serverInfo.REGION_DICT[0][self.GetServerID()]["channel"]: channelName = serverInfo.REGION_DICT[0][self.__GetServerID()]["channel"][int(channel)]["name"] elif channel == 99: channelName = "Special CH" else: channelName = "Unknow CH" net.SetServerInfo("%s, %s" % (serverName,channelName)) if self.interface: self.interface.wndMiniMap.serverInfo.SetText(net.GetServerInfo()) chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (channel)) ##app.ChangeTitle(net.GetServerInfo()) -- add hashtag Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 (edited) https://metin2.download/picture/SNIrsS77d9dz0sHXdFWL0zExj2vWAnrk/.gif My game closes and nothing in my syserr Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 Try this: def RefreshChannel(self, channel): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (channel)) Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 Like this ? def RefreshChannel(self, channel): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (channel)) channelName = "" serverName = serverInfo.REGION_DICT[0][self.__GetServerID()]["name"] if channel in serverInfo.REGION_DICT[0][self.__GetServerID()]["channel"]: channelName = serverInfo.REGION_DICT[0][self.__GetServerID()]["channel"][int(channel)]["name"] elif channel == 99: channelName = "Special CH" else: channelName = "Unknow CH" net.SetServerInfo("%s, %s" % (serverName,channelName)) if self.interface: self.interface.wndMiniMap.serverInfo.SetText(net.GetServerInfo()) ##app.ChangeTitle(net.GetServerInfo()) because it doesn't work. Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 def RefreshChannel(self, channel): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (channel)) Replace RefreshChannel funtion with this. And try it Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 Same disconnect without error. Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 def RefreshChannel(self, channel): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (int(channel))) You have error with variables. Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 Can you help me to find this error ? please Thanks Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 send me server source game/char.cpp , char.h, cmd.cpp, cmd_general.cpp Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 (edited) Okey, char.cpp -> https://pastebin.com/PhGKgc6M char.h -> https://pastebin.com/cF349uCe cmd.cpp -> https://pastebin.com/D7zuAWX4 cmd_general.cpp -> https://pastebin.com/5BAuvJxD Thanks Edited March 26, 2020 by Natox Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 Mate try first this code: Replace: def RefreshChannel(self, channel): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (int(channel))) To: def RefreshChannel(self, channel): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % (str(channel))) And locale_game.txt change in MOVE_CHANNEL_NOTICE text the %d to %s. Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 It's good, but same disconnect without error Link to comment Share on other sites More sharing options...
joshi 34 Posted March 26, 2020 Share Posted March 26, 2020 I rework your source today later or tomorrow Link to comment Share on other sites More sharing options...
Natox 18 Posted March 26, 2020 Author Share Posted March 26, 2020 Okey thanks 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