Python switch bot disconnected

02/04/2018 17:54 DyWalk#1
video:

The problem is: the server is disconnected to select and start a feature.

it may be due to the problem here :
Code:
 def StartSwitchBot(self):
        global SwitchButton
        SwitchButton = 1
        self.SwitchingBreakButton.SetText('DUR')
        self.__Switchtingdialog()

    def __Switchtingdialog(self):
        global Bonus1
        global Bonus3
        global Bonus2
        global Bonus5
        global Bonus4
        global SwitchButton
        Main1, Alter1 = Bonus1
        Main2, Alter2 = Bonus2
        Main3, Alter3 = Bonus3
        Main4, Alter4 = Bonus4
        Main5, Alter5 = Bonus5
        SelectedIndex = self.invListBox.GetSelectedItem()
        if not SelectedIndex:
            SelectedIndex = 0
        else:
            SelectedIndex = SelectedIndex.GetText().split(' | ')[0]
        Slot = SelectedIndex
        val0, bon0 = player.GetItemAttribute(int(Slot), 0)
        val1, bon1 = player.GetItemAttribute(int(Slot), 1)
        val2, bon2 = player.GetItemAttribute(int(Slot), 2)
        val3, bon3 = player.GetItemAttribute(int(Slot), 3)
        val4, bon4 = player.GetItemAttribute(int(Slot), 4)
        Switchvalue = Boniswitchvalue
        Search1 = self.Bvalue1.GetText()
        Search2 = self.Bvalue2.GetText()
        Search3 = self.Bvalue3.GetText()
        Search4 = self.Bvalue4.GetText()
        Search5 = self.Bvalue5.GetText()
        Search6 = self.Bvalue6.GetText()
        Search7 = self.Bvalue7.GetText()
        Search8 = self.Bvalue8.GetText()
        Search9 = self.Bvalue9.GetText()
how can i prevent it?

Upp
02/05/2018 20:49 DyWalk#2
help please!