antiblock
Elveron
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
@Metin2

Erro list index out of range

Question

Boas ! alguem pode me ajudar neste erro 

Citar

0612 18:48:50036 :: Traceback (most recent call last):

0612 18:48:50036 ::   File "uiTaskBar.py", line 949, in OnUpdate

0612 18:48:50036 ::   File "uiTaskBar.py", line 694, in SetMp

0612 18:48:50036 :: IndexError
0612 18:48:50036 :: : 
0612 18:48:50036 :: list index out of range
0612 18:48:50036 :: 

 

	def SetMp(self, _actual, _recovery, _max):
		max_show = 76 -int(76.0 * float(_actual)/ float(_max))
		max_rec =  76 -int(76.0 * float(_recovery)/ float(_max))
		for i in xrange(0,77):
			self.MpFull[i].Hide()
			self.MpRefresh[i].Hide()
		self.MpRefresh[max_rec].Show()
		self.MpFull[max_show].Show()

o erro esta na linha 

self.MpRefresh.Hide()
 

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

tem atenção aos tabs pode ser disso  testa assim

    def SetMp(self, _actual, _recovery, _max):
        max_show = 76 -int(76.0 * float(_actual)/ float(_max))
        max_rec =  76 -int(76.0 * float(_recovery)/ float(_max))
        for i in xrange(0,77):
            self.MpFull[i].Hide()
            self.MpRefresh[i].Hide()
            self.MpRefresh[max_rec].Show()
            self.MpFull[max_show].Show()

 

Edited by DemonAndQueen (see edit history)

Share this post


Link to post
Share on other sites
antiblock
Elveron

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now