Error while battletesting

● ARCHIVED · READ-ONLY
Started by Girostrike 20 posts View original ↗
  1. I had this error pop up when I try to battle test

    Spoiler
    If i try in game battle, it runs fine.
    at the moment I using Galv's Menu Layout and Yanfly's Engine Ace which modify the resolution.
    I'm not sure if these are causing the problem or not.
  2. The error means that the battletest cannot access some data from the map - which it usually can't, because the map is only initialized in the game, not in the battletest.


    One of your scripts tries to get mapdata while inside a battle - that usually happens if you have an on-map-battlescript (those can't be tested in the battletest) or if you added script calls to the wrong class.
  3. I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
  4. It's definitely not a script call on the wrong class.

    What would be an example of an "on-map-battlescript"?

    I might be able to identify the cause if know what that ^^^ is...


    @Shaz Thanks for moving the thread (and sorry about the misplacement).
  5. If you are doing a battle test, it should not be making ANY reference to Game_Map at all. So it's just because of your scripts. Normally when playing, $game_map will have been instantiated before any calls to battle, so you wouldn't get the nil error.


    One of the scripts you're using must be making a reference to $game_map - it's unusual though, since those are fairly popular scripts, that nobody else has come across it yet.


    You could install Mithran's Crash Debugger script (yeah, I know it's not really called that, but humor me :) ) and when you get the error again in battle test, take a look at the console and see what scripts/lines have generated the call to Game_Map line 202.
  6. Should anything be appearing on the console? Because nothing is.

    Spoiler
    Also I can't find the gobj.txt anywhere.

    After each time this error pops up, my script editor goes here. Not sure why.

    Spoiler
    Side note:Went through the scripts I'm using and made a list of the ones that had "$game_map".
    Going through and temporarily deleting each one at a time and checking to see if this helps me find the culprit.


    EDIT: I found the script at fault. I've removed it but know I want to know what exactly this script was doing that caused the problem. 
    Unfortunately the script is from the DS+ Resource Pack I bought via Steam (So not sure if I can just post it). The script's author is Neon Black and the name is "
    Terrain and Region Effects".

    Let me know if you need to see the actual thing.
  7. It goes there because that's the line that causes the error. There is no @map defined in $game_map, because you're doing a battle test and a map hasn't been set up.


    Are you sure you installed Mithran's script correctly? Yes, it SHOULD give you something on the console.


    I hope, by "temporarily delete", you mean you're just commenting them out. DON'T change anything in the default scripts - only in your added scripts. In fact, I'd just comment out the added scripts entirely, rather than just lines here and there (otherwise you're going to cause more problems than you solve). Then re-enable them one at a time until the error happens. If you want to search script by script, look for anything that has $game_map.width and see which of those are not default/RTP scripts. The problem will be with one of them.


    Can you show us the whole list of scripts you have? Just a couple of screenshots so we can see which ones you're using.
  8. @Shaz
    Hopefully this doesn't count as double posting but I saw that you commented as I was editing...

    EDIT: The script in question did not reference $game_map.width.
  9. You sure that script is from that pack? I looked into my DS+ and the only script from Neon Black is Step Effects.


    It's not THIS script, is it?
  10. That's the one. It uses that other name in the actual script.
  11. Alright, I've just posted a link back here in that topic. Neon Black is on this forum frequently, and I'm sure will take a look at your problem as soon as possible :)
  12. Wait I read your last post wrong.

    AM talking about "Step Effects"

    Spoiler
    This is the header of the script.
    I'm not even using Neon's "Terrain Tags" script
  13. Are you SURE that's the script that's causing the issue then? How do you know?


    I do have my doubts. It would be really handy if you could get Mithran's script up and running and get a backtrace of the commands. Go very carefully over the installation instructions for that one again, and see if there's anything you missed, or anything you put in the wrong place.
  14. Battle test works when I remove it. Doesn't when I put it back in. No other changes have be made.
     

    I'm looking into my issues with Mithran's debugger. I'll let you know if I get anywhere.
    EDIT: This is the response I got from Mithran.

    Spoiler
    @girostrike
    If you aren't getting a log or any console messages then there are not any undisposed sprites in memory when the scene switches, so this script probably won't cover whatever is wrong
  15. My script doesn't backtrace nilclass errors, just tracks sprites around and make sure they are disposed. I'm not sure if it can help you in this situation. You could just add a:

    Code:
     print caller.join("\n")
    On the line before the crash and you'll get the full stack put to your console. It may or may not help, as nilclass errors are generally more about what didn't happen than what did. In this case it probably will, since the map width is not something battletest needs to know.
  16. By "line before the crash", do you mean the script position before the script in question or actually in the debugger script?

    Spoiler
    Excuse the naming. Place holder.
  17. in Game_Map. Here:

    Code:
    def width  @widthend
    Code:
    def width  print caller.join("\n")  @widthend
  18. Thank you for the help Shaz. This is what I get.

    Spoiler
  19. Okay, I can see it, but I'm still not sure why that is running. If I play a battle test in the demo project for that script, it works fine.


    So I still think there is something else going on here, and it's not JUST that script at play. That script doesn't use any classes that should be open/referred to during a battle or battle test.


    Would you like to zip up your project and send it through to me so I can take a good look at it? Dropbox or mediafire would both be good. Not 4shared or anywhere I have to register in order to download it.
  20. Yes that would be most helpful. Files have been sent.