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,332
Reaction score
482
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,271
Reaction score
6,015
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,271
Reaction score
6,015
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,332
Reaction score
482
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,271
Reaction score
6,015
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,755
Reaction score
4,603
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

Tfw everyone is trying their hardest to brainstorm about unique ideas and game mechanics, here I am just going: "How am I gonna event conversations with busts" everyday. :kaoswt2:
Comedy is third person, tragedy is first person.
Man. A historic 130 year old church nearby had all of its windows broken out with bricks last night. Such a shame, it wasn't generic stained glass patterns either but had beautifully crafted murals depicting various parts of the gospels.
The Steam Summer Sale's been treating me nicely. Now if only game sales were always this good...
I wonder how many others browse the forum on their phones...
I never thought I'd personally be, but it has long since eclipsed whatever I've done on a computer.

Forum statistics

Threads
99,308
Messages
964,039
Members
130,917
Latest member
DifficultyError
Top