Joined
Aug 13, 2019
Messages
69
Reaction score
12
First Language
english
Primarily Uses
RMVXA
Hi how are things.

I am using the hunger and thrist script from ForeverZer0 and LiTTleDRAgo and it happens that it does not allow to use the command "add members to group"

With this script, if in an event I use that command to add other members to the party, I get this error in "hunger hud" addon:

hud script.png

line 92 is:

Code:
w, h, rate, max = BAR_WIDTH, 8, @stats[i][0], @stats[i][1]    #<-------------------------------- this
      self.contents.draw_bar_hunger(x, 12+y, w, h, rate, max, BAR_STYLE, @colors1)
      # Draw thirst bars.
      rate, max, height = @stats[i][2], @stats[i][3], 16+8+4
      self.contents.draw_bar_hunger(x, height+y, w, h, rate, max, BAR_STYLE, @colors2)
    end
  end

somebody could help me? Thank you
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,362
Reaction score
9,730
First Language
German
Primarily Uses
RMMV
the message basically says that you are trying to access a data object that does not exist.
this usually is caused by one of three possibilities:

1) the object is missing from the database (for example because you deleted it there)
2) you loaded a savegame that is incompatible and does not contain the required data (always start new games after adding a script that adds data to savefiles)
3) the script has a wrong configuration and you need to change its configuration to fit your game project.
 
Joined
Aug 13, 2019
Messages
69
Reaction score
12
First Language
english
Primarily Uses
RMVXA
the message basically says that you are trying to access a data object that does not exist.
this usually is caused by one of three possibilities:

1) the object is missing from the database (for example because you deleted it there)
2) you loaded a savegame that is incompatible and does not contain the required data (always start new games after adding a script that adds data to savefiles)
3) the script has a wrong configuration and you need to change its configuration to fit your game project.

I have started a new game and still the error persists.

Which object are you referring to?

Could it be that perhaps the script tries to add a hud of hunger and thirst to the follower and how the hud does not allow more than one player, that's why the error comes out?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,362
Reaction score
9,730
First Language
German
Primarily Uses
RMMV
all possible, I can't tell because I don't know the script.

it could be any database object, from actor to item - and yes, it can be that the script is configured to use an item or actor from the database and if that does not exist, this error happens. That is why you always have to configure scripts before you use them - the script defaults rarely fit the current project.
A lot of scripts cannot be used until they get the configuration adapted to the project they are in.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,154
Reaction score
1,110
First Language
English
Primarily Uses
RMVXA
It gets hung up on the @stats variable. When the party changes, the @stats variable is not updated.
Put at the top of your refresh method (line 56)
@stats = @function_stats.call

This also works. Put at the top of refresh method
Ruby:
    if @stats.size != @function_stats.call.size
      @stats = @function_stats.call
    end
 
Last edited:
Joined
Aug 13, 2019
Messages
69
Reaction score
12
First Language
english
Primarily Uses
RMVXA
It gets hung up on the @stats variable. When the party changes, the @stats variable is not updated.
Put at the top of your refresh method (line 56)
@stats = @function_stats.call

This also works. Put at the top of refresh method
Ruby:
    if @stats.size != @function_stats.call.size
      @stats = @function_stats.call
    end

ok, it works great, thanks, but how do I hide the other member hunger and thirst bars?, without hiding that of the main character
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,154
Reaction score
1,110
First Language
English
Primarily Uses
RMVXA
Then you would never know if the other members are hungry or thirsty.
Line 70 @actors.each_index do |i|
put after that
next if i > 0
 

Latest Threads

Latest Profile Posts

And today we got some insides maps from the town i posted last time.

Map044.png
Map045.png
Map046.png
Map047.png Map048.png Map049.png Map050.png
So a big bug that was on a glue trap at home is now magically not on the glue trap. This feeling of terror I'm experiencing could be a fun thing to put in my game project (not the IGMC one).
Hoping that Unite has a character generator with black hairs/lips and other features.. it is such a pain making characters without these...
Today is my dad's birthday! And he's still going strong in his retirement days!

Forum statistics

Threads
123,395
Messages
1,156,259
Members
161,851
Latest member
fudgeymcpopsicle
Top