Hunger and Thirst script error (VX ACE)

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
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.
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?
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.
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
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
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
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
it works, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/hunger-and-thirst-script-error-vx-ace.141984/