Hey guys,
So I just installed the Moghunter boss hp bar because most of the scripts in my game are from moghunter and it looked visually good. Sadly though it wasn't as simple as I thought... After installing it I went into the troops section and tried a simulation battle, there were no issues there, the bar appeared and functioned as it should.
So thinking that nothing was wrong I continued with my game, until it came down to playtest it. As soon as an encounter occurred I got this error:
Script 'MOG_Boss_HP_Meter' line 222: NoMethodError occured.
undefined method '[ ]=' for nil:NilClass
So trying to figure out what the problem was I went into the script editor and that brought me straight to line 222 in the boss hp script:
214 def clear_enemy_setup
215 @Name = ""
216 @hp = 0
217 @hp2 = 0
218 @hp3 = 0
219 @maxhp = 0
220 @hp_old = 0
221 @level = nil
222 $game_system.boss_hp_meter[2] = false
223 $game_system.boss_hp_meter[3] = ""
224 $game_system.boss_hp_meter[4] = 0
225 $game_system.boss_hp_meter[5] = 1
226 $game_system.boss_hp_meter[7] = nil
227 $game_system.boss_hp_meter[8] = 0
228 $game_system.boss_hp_meter[9] = true
229 end
Could anyone help me with this? This is currently the only issue I'm having with the script section.
If anyone can help than thank you very much in advance 🙂
So I just installed the Moghunter boss hp bar because most of the scripts in my game are from moghunter and it looked visually good. Sadly though it wasn't as simple as I thought... After installing it I went into the troops section and tried a simulation battle, there were no issues there, the bar appeared and functioned as it should.
So thinking that nothing was wrong I continued with my game, until it came down to playtest it. As soon as an encounter occurred I got this error:
Script 'MOG_Boss_HP_Meter' line 222: NoMethodError occured.
undefined method '[ ]=' for nil:NilClass
So trying to figure out what the problem was I went into the script editor and that brought me straight to line 222 in the boss hp script:
214 def clear_enemy_setup
215 @Name = ""
216 @hp = 0
217 @hp2 = 0
218 @hp3 = 0
219 @maxhp = 0
220 @hp_old = 0
221 @level = nil
222 $game_system.boss_hp_meter[2] = false
223 $game_system.boss_hp_meter[3] = ""
224 $game_system.boss_hp_meter[4] = 0
225 $game_system.boss_hp_meter[5] = 1
226 $game_system.boss_hp_meter[7] = nil
227 $game_system.boss_hp_meter[8] = 0
228 $game_system.boss_hp_meter[9] = true
229 end
Could anyone help me with this? This is currently the only issue I'm having with the script section.
If anyone can help than thank you very much in advance 🙂
