Gizmos Car Keys (improved)

by Pi-C

Tired of running to your vehicle? Then let it come to you! This mod is based on "Gizmos Car Keys" by aodgizmo. It works with most modded car and spider-vehicle prototypes -- not just vanilla cars.

Content
4 months ago
0.17 - 1.1
14.8K
Transportation

b Crash when trying to summon car

3 years ago

When I try to summon the car in my game, it crashes and gives me the following message:

The mod Gizmos Car Keys (improved) (1.1.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event GCKI::on_built_entity (ID 6)
GCKI error! color_vehicle: {self = "userdata"} is not a valid entity!
stack traceback:
[C]: in function 'error'
__GCKI
/common.lua:232: in function 'error'
GCKI/control.lua:560: in function 'color_vehicle'
GCKI/control.lua:1441: in function <GCKI/control.lua:1395>

It seems to be a conflict with AAI vehicles, since it only starts happening when I've deployed and activated an autonomous vehicle. This behavior persists after said vehicle has been removed or destroyed. Is there anything I can do to solve this?

3 years ago

Update: disabling the mod, restarting the game, reloading the save, closing that game without saving, re-enabling the mod, and restarting the game again seems to fix the problem. I would still like to know what causes this bug, though.

3 years ago

Could you provide the saved game, please?

3 years ago

Absolutely! My only question is, how do I do that? I know where to find the save file, but I can't figure out how to attach it to a comment here. I know, I'm a enormous noob, so thanks in advance for your patience, and thanks for the quick response. :D

3 years ago

As far as I know, there's no way to attach a file here. You could upload it somewhere and post the link here, however. Another way would be to send it attached to a Private Message on the forum (but you need to be registered there, and the forums have a spam protection, so only users who have made at least one post there can send PMs). Not sure about the size limit, but a 50MB file probably is too large for an attachment.

3 years ago

https://drive.google.com/file/d/1kB7f5cM-QOaebqqKOSHf7OMNMGtfhoY2/view?usp=sharing

Here it is, thanks again for the help! Admittedly, this save is pretty heavily modded, so I may just need to bite the bullet and disable the car keys mod, as useful as it is. The player character is standing next to a car, and the keys to that car are in their hotbar. I've confirmed that trying to summon the car and trying to lock the car both result in a crash. Thanks for the help!

3 years ago

For some reason, it's working again. I have no idea what happened.

3 years ago
(updated 2 years ago)

I couldn't reproduce the problem, but this is the test that evoked the error:

if not (vehicle and type(vehicle) == "table" and vehicle.valid and vehicle.type == "car") then
  GCKI.error(serpent.line(vehicle) .. " is not a valid entity!", f_name)
end

It seems the function was called for a vehicle that didn't exist anymore. Apparently, AAI replaces vehicles driving autonomously each time a waypoint has been reached, so if you tried to summon the car exactly at the moment where the old one had been removed, but GCKI didn't update its data yet, this may have caused the crash. Perhaps it would be a good idea to silently leave the function instead of issuing an error. :-)

New response