Sandbox Error
Posted: Thu Jun 20, 2013 4:36 am
Hello.
Recently, I've been having some issues with a custom ship in the BF sandbox. When I try to spawn the ship/select it, it gives numerous divide by zero errors.
It give something like this:
_
ERROR in
action number 1
of Other Event: User Defined 0
for object GUI_HudText:
Error in code at line 55:
draw_healthbar(barx,bary,barx + barlength,bary +GUI_HealthBarHeight ,l_owner.l_weapon.l_hp/l_owner.l_weapon.l_maxhp*100,$000000,$0000FF,$00FF00,0,1,0)
at position 133: Division by 0.
This isn't my first custom ship, and I don't think I'm doing anything wrong with the sprite settings. From my observations, it seems that the issue is mainly due to some kind of drawing error in the HUD side bar, since it fails to show the health of individual ship sections.
I didn't find anything related to this after searching the forums and skimming the FAQ, so any help would be appreciated.
EDIT: I remodeled it and the problem was resolved. Probably a fluke. Thanks for the help, everyone.
Recently, I've been having some issues with a custom ship in the BF sandbox. When I try to spawn the ship/select it, it gives numerous divide by zero errors.
It give something like this:
_
ERROR in
action number 1
of Other Event: User Defined 0
for object GUI_HudText:
Error in code at line 55:
draw_healthbar(barx,bary,barx + barlength,bary +GUI_HealthBarHeight ,l_owner.l_weapon.l_hp/l_owner.l_weapon.l_maxhp*100,$000000,$0000FF,$00FF00,0,1,0)
at position 133: Division by 0.
This isn't my first custom ship, and I don't think I'm doing anything wrong with the sprite settings. From my observations, it seems that the issue is mainly due to some kind of drawing error in the HUD side bar, since it fails to show the health of individual ship sections.
I didn't find anything related to this after searching the forums and skimming the FAQ, so any help would be appreciated.
EDIT: I remodeled it and the problem was resolved. Probably a fluke. Thanks for the help, everyone.