Hime's Cover Target script always crashes my game as soon as I run it! Please help!

I am unable to get Hime's Cover Target script to work in my game! Every time I load a game or start a new game, my game always crashes a few seconds in with this error message:
1685557284148.png


Line 107 is: "@cover_targets.delete(state_id)"

The instructions for that script never told me to edit anything in the code so I did not but that line looks suspicious. Maybe I am missing something.

Can anybody help me with this? Nobody else seems to be complaining about this yet I get this crash every time.
Got a Link to the Script?
I was getting ready to edit my post to include it. But since you replied, here:
I've moved this thread to RGSSx Script Support. Thank you!

Also, I could be wrong, but if this is more or less the same as the other thread you posted, I can close that one if you need. I could be wrong but one looks like a support thread and one looks like an edit request. Lemme know!

I've moved this thread to RGSSx Script Support. Thank you!

Also, I could be wrong, but if this is more or less the same as the other thread you posted, I can close that one if you need. I could be wrong but one looks like a support thread and one looks like an edit request. Lemme know!

That other one is no longer needed. This is current. It was for two completely different problems and this thread is nicer. So keep this one.
I suggest you follow the link "how to use a script" in my signature to the bughunting sections.
Download and install the backtracer script, then play the game until the next crash and post a console screenshot of the backtracer output.
that should help in identifying the true cause of the crash.
I suggest you follow the link "how to use a script" in my signature to the bughunting sections.
Download and install the backtracer script, then play the game until the next crash and post a console screenshot of the backtracer output.
that should help in identifying the true cause of the crash.
There is no backtracker scripts posted in either of those two links. There is not one in the master script list either. Even doing a CTRL+F for "backtracker" = "text not found" on all of those pages


Edit: Found it. Different name


Here's the log:

1685564943061.png


I literally walk two steps, two squares, and it crashes.
There is no backtracker scripts posted in either of those two links. There is not one in the master script list either. Even doing a CTRL+F for "backtracker" = "text not found" on all of those pages
How about instead of giving Andar an angry face and telling him what detail you went through to prove him wrong, you do some cursory reading?

Right where he said it would be in his post, under bughunting crashes, is a link to a script for full error backtrace.

But yes. It totally makes sense to react that way over a few letters' difference to the person who's giving you help from memory from a years-old post when English isn't his first language...instead of just taking a slight bit of time to look. It took me literally less than one minute to find exactly what Andar said was there.

There's no hope.
Here's a simplified backtracer.

Ruby:
module SceneManager
  def self.run
    begin
      DataManager.init
      Audio.setup_midi if use_midi? and !@skip_midi
      @scene = first_scene_class.new
      @scene.main while @scene
    rescue RGSSReset
      @scene.terminate if @scene
      @skip_midi = true
      clear
      retry
    rescue => e
      msgbox e.class, ", ", e.name, "\n", e.message
      msgbox e.backtrace
      file = File.open("error.log", "w")
      file.puts Time.now, e.class, e.name, e.message, e.backtrace
      file.close
    end
  end
end

It will pop up twice while also writing a log named error.log in the game's root folder.

There is no backtracker scripts posted in either of those two links. There is not one in the master script list either. Even doing a CTRL+F for "backtracker" = "text not found" on all of those pages
Well, maybe that happened to you because it could be called backtrace or backtracer instead...
How about instead of giving Andar an angry face and telling him what detail you went through to prove him wrong, you do some cursory reading?

Right where he said it would be in his post, under bughunting crashes, is a link to a script for full error backtrace.

But yes. It totally makes sense to react that way over a few letters' difference to the person who's giving you help from memory from a years-old post when English isn't his first language...instead of just taking a slight bit of time to look. It took me literally less than one minute to find exactly what Andar said was there.

There's no hope.
I removed the angry face once I found it
I removed the angry face once I found it
Even if you had never found it, you shouldn't have left the angry face at all. Perhaps a sad one because you were unable to find it at some point, but that was it.

Anyway, i don't know why I keep coming back only to be ignored. :S
Right…so maybe this is a moment to reflect and realize to fully understand what is being said before reacting. I see these people in your threads all the time despite everything. Pull back and try again if something doesn’t work right away. No one here wants to hurt or frustrate you. Misunderstandings are common on the Internet and people frequently need to ask clarifying questions to understand one another.
1685565348757.png


The log from the other one is attached.


I'm sorry. I'm frustrated. I wanted to play(test) my game today and was really looking forward to it but instead I have to deal with a crash.
Even if you had never found it, you shouldn't have left the angry face at all. Perhaps a sad one because you were unable to find it at some point, but that was it.

Anyway, i don't know why I keep coming back only to be ignored. :S
I was caught in the heat of the moment when I did that
Anyway, I think I have a clue on what's happening in your game right now.

@MoltresRider you added the script way after playtesting your game for the first time. This means that when Game_BattlerBase should have initialized @cover_targets , it never did because the heroes were created before the inclusion of the script.

You have 2 ways to solve that.
  1. Delete ALL saved games. (The solution!)
  2. Run $game_party.members.each {|m| m.clear_cover_targets } to create the badly needed Hash at once. (This is a workaround.)
Run $game_party.members.each {|m| m.clear_cover_targets } to create the badly needed Hash at once. (This is a workaround.)
As a script call? or a normal script?
@MoltresRider
I don't even care about faces or tone of anyone posting, but I consider your thought processes to be really sad from an entire different point of view:

You have problems with a script that are not easily solved at first glance, and someone points you to a tutorial not only on how to use scripts, but one that contains specifically bughunting sections on how to handle errors in scripts.
And instead of READING those bughunting sections to learn what you can do yourself, you use a text search for a specific string - and even when that fails you didn't even consider reading the tutorial to find out what you might have missed with bughunting?

We cannot make your game for you, and it is absolutely impossible to point you to an exact problem unless it is a basic and often repeated problem of a newbie.
You need to learn to think for yourself, and look around to be able to ever finish your game.

-------------------

As for the backtracer output it tells that there is a minor chance of an incompatibility caused by the mapshot and screenshot scripts (why two of them anyway?), so I suggest trying once with those scripts disabled (only disabled, no need to remove them as they are unlikely to cause the problems)

The more probable cause is that you configured the cover script wrong, because no other script is clashing there. So you should give us screenshots of how you configured the cover script.

EDIT:
As a script call? or a normal script?
If yo do not understand that, then use the first solution: delete all savefiles)
As a script call? or a normal script?
As a SINGLE, ONE TIME script call, while being far away of any event that might trigger an event like adding a state...

The more probable cause is that you configured the cover script wrong, because no other script is clashing there. So you should give us screenshots of how you configured the cover script.

Not really @Andar . Moltres didn't need to do anything good or wrong to make it happen. Moltres simply thought that adding the script would make it run AFTER adding those specific Note tags. And it almost worked till I realized that he had never initialized the most basic instance variable that makes it work smoothly. And the reasoning behind it is that those actors had no need to create that variable for it didn't exist due to the lack of the cover target script at that point in time.
It seems to work. I was actually able to leave Berlin, a 100x100 map instead of crashing after a few steps. And I have you to thank for that.

I will continue to monitor the situation to see if there are any more crashes.
It seems to work. I was actually able to leave Berlin, a 100x100 map instead of crashing after a few steps. And I have you to thank for that.

I will continue to monitor the situation to see if there are any more crashes.
I can guarantee you here and now that it won't break again, unless you add new scripts or delete some at any moment in the (near) future. Once the variables are created, you're good to go.

Heck, I know this because i've been making scripts for over a decade. I know when something's missing. It's my talent ever since day 1 of scripting. Really. And this wasn't a complex script anyway...
Another error crash! even after applying the script! A monster casted darkness (blinds target) and I get this crash

1685567214724.png



This time, coming from this script, multiple lines: https://himeworks.com/redirect.php?type=script&name=Cover_Conditions

Original thread: https://forums.rpgmakerweb.com/threads/himes-cover-target-script-always-crashes-my-game-as-soon-as-i-run-it-please-help.157955/