[How-To] Improved vehicle spawn functions

I just tried saving the code I wrote above as a new procedure in navicat and it worked fine. What I did was open hivemind and expand functions. I clicked on new function and selected the "procedure" option. I then pressed next all the way until it finished. I then pasted the pSpawnVehicles code above into it, making sure it deleted the crap Navicat puts in there by default. Pressing save asked me to name the function and it saved with no problems... :S I don't know what's the problem, but I messaged you my skype name. Message me with yours and I will try help you.
Hehe I now noticed that it set parameter where I thought I wrote the name of the procedure, but I now skipped that step and it worked. Thanks dude :)
 
I stickied all of your threads. Thanks for the contribution to the DayZ Community.
 
HOTFIX** 01/01/2013 - UPDATE YOUR CODE
There was an issue with the function creating vehicles with a NULL ObjectUID/Worldspace in some circumstances. I have updated line 53 of the code to fix this - please update the pSpawnVehicles function if you use if
 
Hi Yorto.

Open the table in Navicat then File -> Query Table. Then delete whatever is on the page and paste in the SQL contents from the file, press execute (You can add both in from the same "Query table" interface)
 
Trying to start a new server and i get this error when running the pSpawnVehicle procedure: 1054 - Unknown column 'Legit' in 'field list'

Any ideas?
 
Oh yes, sorry I didn't think that through. The Legit column is because I pasted pSpawnVehicles as it should be if using my "Prevent persistend vehicles hacked into database" guide. I will ammend the pSpawnVehicles now and fix it. By the time you read this, I should have fixed pSpawnVehicles.

EDIT: Fixed. Although, you may aswell now follow the hackedvehicle prevention seeing as half the work is already done for you lol .
 
Hey Doc I get stuck when you say "change the name pMain() to pSpawnVehicles editing the .bat file" how do you do that? :) thanks in advance :)
 
There is an @START_SERVER.bat in your main arma2 OA folder. Right click it and select "Edit" then find the relevant line and change it. Then you can save it :)
 
OK not sure where to being to search for this problem, but after using your changed pSpawnVehicles I start up my server and when it starts reading the mission file, the server.bat crashes. There's no way to leave my server up...
 
OK not sure where to being to search for this problem, but after using your changed pSpawnVehicles I start up my server and when it starts reading the mission file, the server.bat crashes. There's no way to leave my server up...

Do you mean your arma2oaserver.exe crashes? This is odd. Is there a corrupt object in object_data that is causing this? This usually occurs if you try to spawn a building in which has invalid parameters (see my building spawning guide) but can also happen if a vehicle has invalid parameters.

Hs this problem occured immediately after using my method, or some while after?
 
I mean the entire server crashes. I get a crash stating that Operation Arrowhead is not responding whenever the mission file is read. It automatically closes the ArmA OA Console....
 
Ok, that's probably an issue with one of the objects in object_data. Something has a NULL value for either:

ObjectID, Inventory, Fuel, Hitpoints, Damage or Timestamp.

If any object is null for any of those, it will cause a server crash. I'm almost certain pSpawnVehicles would not have caused any of them to be null unless your object_classes table is not correctly set up.
 
Found it! One of the Skodas was Null'd. I dont care for that car so I just deleted it. Seems to be working now! Thanks again Doc!
 
Back
Top