Jump to content
Korean Random
Sign in to follow this  
DKRUBEN

Help (fix mod)

Recommended Posts

how to find value 0 in tank stats.
python code.

 

def __getAccountDossier(self):
	dossier = self.itemsCache.items.getAccountDossier().getRandomStats()
    return dossier

def _setValue(itemCD):
	stats = self.__getAccountDossier().getVehicles().get(intCD)
    result = float(100.0 * stats.wins / stats.battlesCount if stats.battlesCount else 0) # value sup 0 don't return  battlesCount = 0
    if stats.battlesCount != 0:
		return
    value = '%.2f' % result if result < 100 else '100'
    value = '%s' % value.rjust(5)
    self.macro['win'] = '%s%%' % str(value) # internal
   	self.macro['c:win'] = self.getColor('winRate', result) # internal

 

Share this post


Link to post

Short link
Share on other sites

when I try of tanks do not have battles, I get the message in the log saying stats.battleCount does not exist.:sob:

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...