Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

Auto potion problem


CristianDragan

Question

I've installed auto potions, they work, PV and PM regenerates, but I can't see how much % are left in them.

Sorry for my bad english.

 

Photo: 0426_020516.jpg

 

 

syserr: 

0426 01:34:24605 :: Traceback (most recent call last):

0426 01:34:24605 ::   File "ui.py", line 1391, in OnOverInItem

0426 01:34:24605 ::   File "ui.py", line 87, in __call__

0426 01:34:24605 ::   File "ui.py", line 78, in __call__

0426 01:34:24605 ::   File "uiInventory.py", line 588, in OverInItem

0426 01:34:24605 ::   File "uiInventory.py", line 756, in __ShowToolTip

0426 01:34:24606 ::   File "uiToolTip.py", line 526, in SetInventoryItem

0426 01:34:24606 ::   File "uiToolTip.py", line 1083, in AddItemData

0426 01:34:24606 :: TypeError
0426 01:34:24606 :: : 
0426 01:34:24606 :: not all arguments converted during string formatting
0426 01:34:24606 ::

 

uitooltip.py
            ## ŔÚµżą°ľŕ
            elif constInfo.IS_AUTO_POTION(itemVnum):
                if 0 != metinSlot:
                    ## 0: Č°ĽşČ­, 1: »çżë·®, 2: ĂŃ·®
                    isActivated = int(metinSlot[0])
                    usedAmount = float(metinSlot[1])
                    totalAmount = float(metinSlot[2])
                    
                    if 0 == totalAmount:
                        totalAmount = 1
                    
                    self.AppendSpace(5)

                    if 0 != isActivated:
                        self.AppendTextLine("(%s)" % (localeInfo.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
                        self.AppendSpace(5)
                        
                    1083 LINE -> self.AppendTextLine(localeInfo.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)

 

Thank you in advance!

Edited by CristianDragan
solved (see edit history)
Link to post

5 answers to this question

Recommended Posts

  • 0
  • VIP

try 

self.AppendTextLine(str(localeInfo.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0))), self.POSITIVE_COLOR)

 

 

  • Love 1
Link to post
  • 0
Posted (edited)
28 minutes ago, Kyo said:

try 

self.AppendTextLine(str(localeInfo.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0))), self.POSITIVE_COLOR)

self.AppendTextLine(str(localeInfo.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0))), self.POSITIVE_COLOR)

 

 

 

Nothing has changed, unfortunately. Thanks for the reply.

 

29 minutes ago, Kyo said:

try 

self.AppendTextLine(str(localeInfo.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0))), self.POSITIVE_COLOR)

self.AppendTextLine(str(localeInfo.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0))), self.POSITIVE_COLOR)

 

 

I solved it like this:

self.AppendTextLine(localeInfo.TOOLTIP_AUTO_POTION_REST + "%d" % (100.00 - ((usedAmount/totalAmount) * 100.00)), self.POSITIVE_COLOR)

 

spacer.png

 

Do you or anybody know to make it like on official servers? Like 99,99.

Thanks.

Edited by CristianDragan
wrong edit (see edit history)
Link to post
  • 0
8 hours ago, CristianDragan said:

 

Nothing has changed, unfortunately. Thanks for the reply.

 

I solved it like this:

self.AppendTextLine(localeInfo.TOOLTIP_AUTO_POTION_REST + "%d" % (100.00 - ((usedAmount/totalAmount) * 100.00)), self.POSITIVE_COLOR)

 

spacer.png

 

Do you or anybody know to make it like on official servers? Like 99,99.

Thanks.


Change

%d

to 

%.2f%%

 

  • Love 1

153046Sygnatura.png

Link to post

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


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