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.
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.
Should anything be appearing on the console? Because nothing is.
Also I can't find the gobj.txt anywhere.
After each time this error pops up, my script editor goes here. Not sure why.
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".
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.
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.
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:
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.
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.
Back in the old days, long before I was born, salted crisps - or potato chips, for you yanks - came unsalted and had a little pouch of salt to manually shake on it. Of course, things are more efficient now, but Walker's still brought back the old 'Salt 'N' Shake' style a couple years ago. Dunno why, but if I had to guess, I'd say it's because the nostalgia crowd were getting salty.