[How-To] Improved vehicle spawn functions

Discussion in 'General Discussion' started by Doc, Dec 16, 2012.

  1. Doc

    Doc Valued Member!

    Joined:
    Nov 23, 2012
    Messages:
    355
    Likes Received:
    39
    Awesome. It would be worth noting how that car became nulled. Maybe you can scan your log-queries.txt trying to find it. I highly doubt the pSpawnVehicles caused it, so it may have been an error in dayz code or it may have been hacked in (badly)
     
  2. Midiouss

    Midiouss Member

    Joined:
    Dec 10, 2012
    Messages:
    33
    Likes Received:
    0
    It happened again. Another Skoda popped up in the objects_data and it's nulled. Ill attached a screenshot of my objects_data. Also, the vehicles in objects_data are the only vehicles spawning on my map. I have no idea how to change that. I would like little birds and Mi17's and all the other types of vehicles I'm missing... null.jpg
     
  3. Forgotten

    Forgotten Well-Known Member

    Joined:
    Oct 22, 2012
    Messages:
    142
    Likes Received:
    7
    Nice background!

    I had that same exact thing happen to me. I believe I fixed it by loading an earlier copy of my schema and mysql files inside dayz_data.
     
  4. Midiouss

    Midiouss Member

    Joined:
    Dec 10, 2012
    Messages:
    33
    Likes Received:
    0
    Thanks! I don't believe I have another copy of mine :(
     
  5. Forgotten

    Forgotten Well-Known Member

    Joined:
    Oct 22, 2012
    Messages:
    142
    Likes Received:
    7

    Re-download the server files and use those. Just replace those and back everything up first.
     
  6. Midiouss

    Midiouss Member

    Joined:
    Dec 10, 2012
    Messages:
    33
    Likes Received:
    0
    Any chance of a tutorial on how to load the schema and mysql files into dayz_data? I've never done anything like that and I don't have the slightest clue on how to start...
     
  7. Forgotten

    Forgotten Well-Known Member

    Joined:
    Oct 22, 2012
    Messages:
    142
    Likes Received:
    7
    Nah, no problem. It's just copying over the old files. Nothing fancy like having to execute them.

    They are in MYSQL>dayz_data. Just copy the new fresh ones over the old ones, took care of the null issue for me.

    Also make sure you've got the same couple of fixes that Doc has posted.
     
  8. Midiouss

    Midiouss Member

    Joined:
    Dec 10, 2012
    Messages:
    33
    Likes Received:
    0
    Thanks! So far no null skodas popping up lol
     
  9. Forgotten

    Forgotten Well-Known Member

    Joined:
    Oct 22, 2012
    Messages:
    142
    Likes Received:
    7
    Here's hoping that did it. With me, it was all new vehicles spawning that were being created with null. Was terrible.
     
  10. Midiouss

    Midiouss Member

    Joined:
    Dec 10, 2012
    Messages:
    33
    Likes Received:
    0
    OK well i turned battle eye off, locked my server, and ran my script to see all vehicles on the map. None of the new vehicles are in except for BAF offroad. Only two heli's on the map too and they are UH1H's.
     
  11. m1lkm8n

    m1lkm8n Member

    Joined:
    Jan 18, 2013
    Messages:
    94
    Likes Received:
    7
    ok im trying to follow this to uipdate my spawn scripts and im getting this error:
    error 1136 (21s01) at line 1: column doesn't match count at row 1

    what am I doing wrong?
    thanks
     
  12. Ryahn

    Ryahn New Member

    Joined:
    Oct 18, 2012
    Messages:
    21
    Likes Received:
    0
    I was able to add this without error. I could look at it if Doc doesnt get back with you
     
  13. m1lkm8n

    m1lkm8n Member

    Joined:
    Jan 18, 2013
    Messages:
    94
    Likes Received:
    7
    thanks. its prob something I did in these pics. its was 2am and I was trying to finish this up while falling asleep at the computer.

    I fixed it. Once I sleep I looked back at what I did. Made the changes and it works fine now!
     

    Attached Files:

  14. Doc

    Doc Valued Member!

    Joined:
    Nov 23, 2012
    Messages:
    355
    Likes Received:
    39

    You haven't added the new columns to the tables (near bottom of the guide) :)
     
  15. Doc

    Doc Valued Member!

    Joined:
    Nov 23, 2012
    Messages:
    355
    Likes Received:
    39
    Make sure your script is running without error. Execute pSpawnVehicles and see what the mysql response is. There may be an error.

    Assuming it is installed correctly, are you actually executing the function before you start the server? This is by changing pMain to pSpawnVehicles when you edit your @START_SERVER.bat
     
  16. Ryahn

    Ryahn New Member

    Joined:
    Oct 18, 2012
    Messages:
    21
    Likes Received:
    0
    You get my PM Doc on here?
     
  17. Midiouss

    Midiouss Member

    Joined:
    Dec 10, 2012
    Messages:
    33
    Likes Received:
    0
    Yup. I made sure it ran fine and I made the change in the @START_SERVER.bat. I swear I did everything right, that's why im so stumped.
     
  18. Adam

    Adam New Member

    Joined:
    Feb 1, 2013
    Messages:
    1
    Likes Received:
    0
    I have an HBF package plus server and i am missing several of the functions used with your vehicle spawn function like getvehcount etc i tried to create new functions with the code you provided on the first page but i am having an issue saving the fgetvehcount in particular, im sure the vehicle spawner wont work as it lists fgetvehcount in its code can you tell me what im doing wrong? 1418- This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you "might" want to use the less safe log_bin_trust_function_creators variable
     
  19. Cyruz

    Cyruz New Member

    Joined:
    Feb 7, 2013
    Messages:
    1
    Likes Received:
    0
    Hi Doc,

    You going to update the vehicle spawn script for the newer release, can't seem to get it running on a fresh install of the latest server files.
     
  20. Maxiron

    Maxiron New Member

    Joined:
    Feb 8, 2013
    Messages:
    3
    Likes Received:
    0
    I get the same error in Navicat that others are getting. I cut and pasted your text and followed the directions. The procedure won't save.
     

Share This Page