Jump to content

Player Board Error


Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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