Odd Vehicle Respawn Issue

Forgotten

Well-Known Member
I run an rMod server, and before I went to bed last night, I changed some spawns around in my object_spawns file and added a new truck, the MTVR to object_classes.

This morning, was doing some work when I noticed my vehicles were respawning as both NULL in ObjectID and Worldspace. All 113 bicycles spawned back in that way.

Any vehicles I add to spawns end up this way?

Anyone have any clue what I might have accidentally did?

I use Doc's PSpawnVehicles method. Was working just fine last night.
 
Hmm this is very odd - is it the ObjectID or the ObjectUID that is appearing null?

ObjectID is a unique identifier which is assigned by the table itself when data is added (if you read they pSpawnVehicles code you will see no mention of ObjectID is made as it is automatically assigned). What I recommend doing first is checking that object_data has "ObjectID" set to Auto Increment. Go to object_data -> "Design Table" in navicat and highlight ObjectID. Make sure the boxes "Auto Increment" and "Unsigned" are checked at the bottom, if not, tick them and save the table. It wont do much harm increasing the Length of ObjectID either. Mine is set to 10, but you can set yours to 12 or 15 to increase your range if your numbers are getting high (Type should be INT).

For a temporary solution, you can spam a bunch of random numbers in the ObjectID of vehicles which are NULL for ObjectID. Atleast they will spawn for now until the reason for this issue is identified.

PS, thank you for using my spawnvehicles script - I hope it's still working for you and this issue is a database one and not from my method :p
 
Indeed, Doc, it was a database issue. Was the wierdest thing. Comp restart and it was fixed.

The only issue with your script I've found is how long it takes to spawn large numbers of vehicles. Don't get me wrong, I'm thrilled it doesn't lock up or anything, so I'm totally fine with it. But as I mentioned in our conversation, I've put in the cleanup where it deletes all bicycles on my server and respawns them, but it's 113 bikes. Server load takes about 5 minutes.

Again, not much of a complaint, that's not something most people are going to be doing. Thanks for all your hard work.
 
Indeed, Doc, it was a database issue. Was the wierdest thing. Comp restart and it was fixed.

The only issue with your script I've found is how long it takes to spawn large numbers of vehicles. Don't get me wrong, I'm thrilled it doesn't lock up or anything, so I'm totally fine with it. But as I mentioned in our conversation, I've put in the cleanup where it deletes all bicycles on my server and respawns them, but it's 113 bikes. Server load takes about 5 minutes.

Again, not much of a complaint, that's not something most people are going to be doing. Thanks for all your hard work.

Yeah, the first execution takes around 6 or 7 seconds for me, but it executes as the server is restarting for me so it doesn'textend restart time at all. 5 Minutes is very long - is that all down to my method?
 
Yeah, I'm using all of your code, excepting the Delete Bicycles thing I inserted into Cleanup.

Essentially my server respawns 120 or so vehicles every restart, so that's what takes so long. I take out that code, it restarts very quickly since it didn't have to respawn a large number.

I reset almost all my vehicles every monday since I have so many, to cut down on hoarding and give people a chance to play with the vehicles. That restart takes QUITE a long time. :)
 
120 respawns should be fairly quick if its respawning all of them in the same location. To be honest, using my method to respawn something with a 100% spawn chance is not ideal - i will write come code to do that neatly for you at a later date.

FYI vehicle spawns, I have just released a hotfix for my Improved Vehicle Spawns RE it creating vehicles with a NULL ObjectUID and NULL Worldspace.
 
Back
Top