Jump to content
UPDATE 2 - External pictures are being replaced... ×
×
×
  • Create New...
  • 0

Player Board Error


kieranFMT2

Question

Hi there guys im trying to add the Illirea player board and im hitting a few errors.

0905 12:46:46778 :: Traceback (most recent call last):

0905 12:46:46778 ::   File "game.py", line 1587, in OnUpdate

0905 12:46:46778 ::   File "ui.py", line 916, in SetPercentage

0905 12:46:46778 :: ZeroDivisionError
0905 12:46:46778 :: : 
0905 12:46:46778 :: float division by zero
0905 12:46:46778 :: 

here is the code in question

		imgCharStatusBG1 = ui.AniImageBox()
		imgCharStatusBG1.AddFlag("not_pick")
		imgCharStatusBG1.AppendImage("d:/ymir work/ui/pattern/exp-voll.tga")
		imgCharStatusBG1.Show()
		self.imgCharStatusBG1 = imgCharStatusBG1
		if player.GetStatus(player.LEVEL) == 255:
			self.imgCharStatusBG1.SetPercentage(player.GetStatus(player.EXP), player.GetStatus(player.NEXT_EXP))
		else:
			self.imgCharStatusBG1.SetPercentage(player.GetStatus(player.EXP), player.GetStatus(player.NEXT_EXP))
		self.imgCharStatusBG1.SetPosition(0, 0)

 

Any Help would be gladly appreciated thanks

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

If you have this error on level 255, then use this statement or remove this useless statement and add to exp_table one row to the end for level 255. Current code is doing the same thing.
 

if player.GetStatus(player.LEVEL) == 255:
	self.imgCharStatusBG1.SetPercentage(player.GetStatus(player.EXP), 1)
else:
	self.imgCharStatusBG1.SetPercentage(player.GetStatus(player.EXP), player.GetStatus(player.NEXT_EXP))

 

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.