Jump to content

Recommended Posts

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

  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 by Natox
Link to comment
Share on other sites

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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