Jump to content

Modifying spawnpoints/ "can't create player -the square is null"


Snuffleupagus

Recommended Posts

I attempted to remove/modify the spawn points in my map mod and seemed to have corrupted it.
 

I backup every version I update to the workshop. I figured updating the spawn points would be as easy as writing a new spawnpoints.lua file and replacing the existing file.

First, I got the newest version of TileZed/WorldEd and the tile folder.

I created my mods folder in the workshop folder, then copied all the contents of my last update into the workshop folder. I made my changes to the spawn points in WorldEd, and saved. I then copied the new spawnpoints.lua into the workshop folder (replacing the existing).

 

First time I loaded in to test it was no problem.

The second time, during the load in I got a message saying an error occurred and to check the console.txt. At the end of the log it show this:

 

WARN : General     , 1653261204776> SpawnPoints.initSpawnBuildings> initSpawnBuildings: no room or building at 8044,10725,0

(multiple entries -presumably for each spawn point)
 

LOG  : General     , 1653261205487> LuaEventManager: adding unknown event "OnPreUIDraw"
java.lang.RuntimeException: can't create player at x,y,z=8843,9951,2 because the square is null
    at zombie.iso.IsoWorld.init(IsoWorld.java:2670)

 

I tried re-generating the lots, and clearing the objects/spawnpoint.lua files and regenerating and re-copying everything fresh into the workshop folder. I thought it was fixed, but on the forth try the error came back.

 

I found the one topic on this error, but the only proposed solution was to start over ("the only downside" -HAHA!!) I'm grasping that someone has a better solution. Or at the very least, can tell me what I did specifically to cause the corruption. RingoD stated it can come from creating your Object.lua file before putting down foraging. (Which is confusing to me, as I thought you had to create the Objects.lua file manually FIRST in notepad before you can save objects to it). Doesn't make sense as i was still using the original Objects file, I only updated the spawnpoints file.
The only other thing I can think of is that using the new editor version to write a new spawnpoint file and trying to use it with lots generated from the old editor version pissed it off somehow. But I don't see how that could corrupt my PZW file. In fact I can't see how any of this would corrupt my PZW file.

 

I was good at backing up my lots, not so good at backing up my PZW file (because I'm a moron).

I'm really hoping someone can throw a lifeline. I've been working/maintaining this map for years, I'm not looking forward to starting over.

 

[UPDATE]

It turns out I DID actually have a backup of my working folder (where i keep my .pzw file, exported lots, .psd's etc) with an unmolested copy of a pretty current version of my .PZW file. I lost a couple of minor tweaks but no big deal. It took a couple tries of deleting/restoring the backup to shake the error. It would work until it tried to spawn me in one of the new spawns. In trying to isolate the problem I deleted all but 1 spawn point and tested with no crash. Then I deleted that spawn and added one more -expecting it to crash, but it didn't. Then I added the rest of the spawns I wanted, tested lots of times and the issue seems to be resolved.

 

I guess the moral of the story is backup and save iterations of your work.

Edited by Snuffleupagus
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...