Game crashes because of healthbar scripts

Yanntastisch

The yanntastic
Member
Joined
May 10, 2020
Messages
26
Reaction score
0
First Language
German
Primarily Uses
RMVXA
I got a weird game crashing error.
I think it appears because I combined V.M's Healthbars script and his Sleek Gauges script.
I don't know exactly why it happens, but it happens when a enemy gets defeated with one hit or by the "Change Enemy HP" function. Here's the error message and the line of the Healthbars script that gets pinned (170):
Unbenannt.PNG
Unbenannt1.PNG
If it can help: I already tried switching the scripts places in my script editor. Healthbars is now below Sleek Gauges.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,336
Reaction score
483
First Language
English
Primarily Uses
RMVXA
Has to be another issue or script. I just tested those two together and there are no issues in my test demo.
 

Yanntastisch

The yanntastic
Member
Joined
May 10, 2020
Messages
26
Reaction score
0
First Language
German
Primarily Uses
RMVXA
I think it also has to do something with the scanning and with the number and gauges counting down.
In my game a enemy gets scanned via status effect for 1 turn after a attack. Also, here are the options I made:

Healthbars:
Unbenannt1.PNG
Sleek Gauges:
Unbenannt2.PNG
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,296
Reaction score
6,055
First Language
Indonesian
Primarily Uses
RMVXA
HP Bar script already requires the Sleek Gauge script to work, so you're not wrong.
However, the Sleek Gauge script is coded wrong. Try to put this little patch below Sleek Gauge (or both, doesn't matter)
Code:
class Window_Base
  def gauges
    @gauges ||= {}
  end
end
See if that fixes the issue.
 

Yanntastisch

The yanntastic
Member
Joined
May 10, 2020
Messages
26
Reaction score
0
First Language
German
Primarily Uses
RMVXA
YES! It works now. Thank you. I think it also was because of my general script order. I changed it a little bit. Oh, and I think you ment that Sleek Gauges requires HP Bars? Because then you wrote it opposite.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,296
Reaction score
6,055
First Language
Indonesian
Primarily Uses
RMVXA
Oh, and I think you ment that Sleek Gauges requires HP Bars? Because then you wrote it opposite.
No, exactly what I wrote.
HP Bar lite won't work without the Sleek Gauge script. It has a code that only present in Sleek Gauge.
 

Yanntastisch

The yanntastic
Member
Joined
May 10, 2020
Messages
26
Reaction score
0
First Language
German
Primarily Uses
RMVXA
Then I don't use Lite. I can use HP Bars without Sleek Gauges.
 

Yanntastisch

The yanntastic
Member
Joined
May 10, 2020
Messages
26
Reaction score
0
First Language
German
Primarily Uses
RMVXA
Well the descriptions says this:
Unbenannt.PNG
And as I said, I can use states. SO I guess it's modfied.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,336
Reaction score
483
First Language
English
Primarily Uses
RMVXA
SO I guess it's modfied
No it's not. The Lite version has that in it, You said you were using the full version since you could use it without the other script. But I also can use it without the sleek gauges.
Then I don't use Lite. I can use HP Bars without Sleek Gauges
I tried the lite version without TheoAllen's addon and didn't have an issue. Must be slight differences from you project to my test project.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,296
Reaction score
6,055
First Language
Indonesian
Primarily Uses
RMVXA
I tried the lite version without TheoAllen's addon and didn't have an issue. Must be slight differences from you project to my test project.
It may or may not trigger the error. In some rare cases, it may trigger the error. There is a possibility that the variable @gauges hasn't been yet initialized and being referenced in the HP Bar which may result in an error. However, I don't want to investigate why as I could just remove the possibility by adding the patch.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,788
Reaction score
4,630
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The more I look at the QPlugins... The more I am amazed at what they can do. Which I'm not going to lie is pretty awkward, because I already consider them far and away the best plugins MV has to offer. :kaoback:
spending a week trying to figure out what was wrong with my font has me DED
504 threads to go upon the time of this post until the forum reaches 100k threads. Thread Dead Redemption. Thready Van Halen. Thread Zeppelin. Doesn't have to be a band or a game
Random thought: Looks like putting in effort in learning a language is like a taboo for most people. :kaoswt2:
Not sure about RPG Maker MZ ; We see a lot of things, but they could have enhanced a lot of things in MV first... We're at the era of updates nowadays, not new products over and over and over :/

Forum statistics

Threads
99,500
Messages
966,116
Members
131,130
Latest member
Player-Unknown
Top