Hey, all. Small incompatibility I'm having trouble nailing down and could use a fresh set of eyes on. TDS's Region Namer and Yanfly's Save System, when used in concert, give me a problem with @map.width, but only when attempting to load a saved file, not while saving. I've stripped down any edits to both scripts and am still getting the problem, and for the life of me I can't figure out why it's happening. Any thoughts from coders more experienced than myself?
Help with Script Conflict
RGSSx Script Support- Are you starting a new game and getting the issues when loading from that new game's save files?
- Have you swapped the script order?
- Have you swapped the script order?
Yes and yes. I've tried a few different load orders with no success.
I did try something new just now, though, which was using "Return to Title Screen" once in-game with a new file and it seems to have no issues with getting the load screen then. It seems as long as I open a new game before trying to load a save file, the load screen works fine. Which is even odder, but may narrow down the search for a cause.
I did try something new just now, though, which was using "Return to Title Screen" once in-game with a new file and it seems to have no issues with getting the load screen then. It seems as long as I open a new game before trying to load a save file, the load screen works fine. Which is even odder, but may narrow down the search for a cause.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
Can you post a screenshot of that error? I only did a quick scan, but neither script seems to contain @map or using the width attribute of the map.
Also, since you mentioned you stripped your edits, did you try downloading fresh versions of those scripts and using them in a project without anything else to make sure it's not some other script's fault?
Also, since you mentioned you stripped your edits, did you try downloading fresh versions of those scripts and using them in a project without anything else to make sure it's not some other script's fault?
Script "Game_Map" line 202: NoMethodError occurred.
Undefined method "Width" for nil:NilClass.
And yeah, it occurs with just the two scripts running in a fresh project.
Undefined method "Width" for nil:NilClass.
And yeah, it occurs with just the two scripts running in a fresh project.
So you're saying NONE of the save files you are trying to load were from games started before both the scripts were added?
It's saying @map does not exist. That is created when you first go to a new map.
Any chance you're trying to load a save that was made when you were on a map that has since been deleted?
Go to your Game_Map class and add the following after line 201:
then play with the console on. Load your save file and see what number is printed to the console. It THINKS it's got that map id. Make sure you have a map with that number in the project.
It's saying @map does not exist. That is created when you first go to a new map.
Any chance you're trying to load a save that was made when you were on a map that has since been deleted?
Go to your Game_Map class and add the following after line 201:
Code:
p @map_id
The error occurs on trying to load the list of save files, not the file itself. And it occurs on a brand new project with only those two scripts (and YF Core Engine which the Save System requires) and only the initial map. I also troubleshot Region Namer without the save system but with the core engine, and the save system without Region Namer but with the core engine to eliminate that possibility.
I'll try the p @map_id next time I load up RMVXA.
I'll try the p @map_id next time I load up RMVXA.
Have you tried swapping the order of the scripts?
Yes I've tried reversing the order.
p @map_id returns "nil".
p @map_id returns "nil".
Original thread: https://forums.rpgmakerweb.com/threads/help-with-script-conflict.39208/