Então, tava testando o projeto aqui e eu peguei level 99 pra testar tudinho, só que, ao chegar no level 99 da erro na HUD de divisão por 0 que com certeza é da EXP. a minha HUD usa % na EXP, alguem ai sabe como posso concertar esse erro?!
2 participantes
[Pedido] Win HUD error dividide by 0
イアゴル- Membro Ativo
- Mensagens : 350
Créditos : 27
- Mensagem nº1
[Pedido] Win HUD error dividide by 0
_________________
Haters? Haters gonna Hate!
Gauthier99- Iniciante
- Mensagens : 33
Créditos : 24
- Mensagem nº2
Re: [Pedido] Win HUD error dividide by 0
I haven't got this problem.
May be this is work in NPM 4.0.7.
Else, you can do something like that in your script :
while
---if level = 99
-----exp = 0
-----maxexp = 0
end while
(this is not a real script, of course)
May be this is work in NPM 4.0.7.
Else, you can do something like that in your script :
while
---if level = 99
-----exp = 0
-----maxexp = 0
end while
(this is not a real script, of course)
_________________
"My script doesn't work, I don't know why :/
My script works, I don't know why ._."
- All great scripters
My Script
イアゴル- Membro Ativo
- Mensagens : 350
Créditos : 27
- Mensagem nº3
Re: [Pedido] Win HUD error dividide by 0
I think it's because im using a percent module on experience, if you know how fix post please ! thanks .
_________________
Haters? Haters gonna Hate!
Gauthier99- Iniciante
- Mensagens : 33
Créditos : 24
- Mensagem nº4
Re: [Pedido] Win HUD error dividide by 0
Can I see your % module please ?
_________________
"My script doesn't work, I don't know why :/
My script works, I don't know why ._."
- All great scripters
My Script
イアゴル- Membro Ativo
- Mensagens : 350
Créditos : 27
- Mensagem nº5
Re: [Pedido] Win HUD error dividide by 0
Gauthier99 escreveu:Can I see your % module please ?
- Código:
# Valor Exp
self.bitmap.font.color = Color.new(0,0,0)
bitmap.font.name = "Arial Black"
bitmap.font.size = 16
exprect = Rect.new(-123, 25, self.bitmap.width - 8, 32)
@exp_percent = $game_party.actors[0].now_exp*100/$game_party.actors[0].next_exp
self.bitmap.draw_text(Rect.new(50,75,32,32), @exp_percent.to_s, 1)
self.bitmap.draw_text(71, 75, 32, 32, "%")
self.bitmap.font.color = Color.new(255,255,255)
exprect2 = Rect.new(-124, 76, self.bitmap.width - 8, 32)
self.bitmap.draw_text(Rect.new(49,74,32,32), @exp_percent.to_s, 1)
self.bitmap.draw_text(70, 74, 32, 32, "%")
_________________
Haters? Haters gonna Hate!
Gauthier99- Iniciante
- Mensagens : 33
Créditos : 24
- Mensagem nº6
Re: [Pedido] Win HUD error dividide by 0
I have edit the module. I don't know if it works so I post 2 new module :
or
May be you have to re-create a new player profile.
- Código:
# Valor Exp
self.bitmap.font.color = Color.new(0,0,0)
bitmap.font.name = "Arial Black"
bitmap.font.size = 16
exprect = Rect.new(-123, 25, self.bitmap.width - 8, 32)
if $game_party.actors[0].next_exp == 0
@exp_percent = 0
else
@exp_percent = $game_party.actors[0].now_exp*100/$game_party.actors[0].next_exp
end
self.bitmap.draw_text(Rect.new(50,75,32,32), @exp_percent.to_s, 1)
self.bitmap.draw_text(71, 75, 32, 32, "%")
self.bitmap.font.color = Color.new(255,255,255)
exprect2 = Rect.new(-124, 76, self.bitmap.width - 8, 32)
self.bitmap.draw_text(Rect.new(49,74,32,32), @exp_percent.to_s, 1)
self.bitmap.draw_text(70, 74, 32, 32, "%")
or
- Código:
# Valor Exp
self.bitmap.font.color = Color.new(0,0,0)
bitmap.font.name = "Arial Black"
bitmap.font.size = 16
exprect = Rect.new(-123, 25, self.bitmap.width - 8, 32)
if $game_party.actors[0].level == 99
@exp_percent = 0
else
@exp_percent = $game_party.actors[0].now_exp*100/$game_party.actors[0].next_exp
end
self.bitmap.draw_text(Rect.new(50,75,32,32), @exp_percent.to_s, 1)
self.bitmap.draw_text(71, 75, 32, 32, "%")
self.bitmap.font.color = Color.new(255,255,255)
exprect2 = Rect.new(-124, 76, self.bitmap.width - 8, 32)
self.bitmap.draw_text(Rect.new(49,74,32,32), @exp_percent.to_s, 1)
self.bitmap.draw_text(70, 74, 32, 32, "%")
May be you have to re-create a new player profile.
_________________
"My script doesn't work, I don't know why :/
My script works, I don't know why ._."
- All great scripters
My Script
イアゴル- Membro Ativo
- Mensagens : 350
Créditos : 27
- Mensagem nº7
Re: [Pedido] Win HUD error dividide by 0
I tried the seconde one and works, thanks +1 credits Pode Trancar o Topico!
_________________
Haters? Haters gonna Hate!