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
3 months ago
0.17 - 1.1
14.8K
Transportation

b [Fixed] Crash on load

11 months ago
(updated 11 months ago)

Hi,

I am playing a multiplayer session with the Nullius Momenti mod pack. When I updated the base game to 1.1.101, I got the following error message:

The mod Gizmos Car Keys (improved) (1.1.12) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event GCKI::on_configuration_changed
GCKI/scripts/player_functions.lua:114: attempt to index local 'f_data' (a nil value)
stack traceback:
GCKI/scripts/player_functions.lua:114: in function 'init_player'
GCKI/scripts/event_handlers.lua:1131: in function 'on_configuration_changed'
GCKI/control.lua:164: in function <GCKI/control.lua:162>

11 months ago

Thanks for the report! This is strange, as the table for the force data should have been created immediately before f_data was defined. Please add

GCKI.show("global.force_data", global.force_data)

at line 122 of scripts/force_functions.lua and

GCKI.show("f_data", f_data)

at line 95 of scripts/player_functions.lua, then enable the startup setting "Write debug messages to logfile". Restart Factorio, load the game, and upload the logfile (factorio-current.log) after the crash.

11 months ago

Thank you for the prompt response.
You can find the log here: https://we.tl/t-cJiIZ6wrkk

11 months ago
(updated 11 months ago)

OK, multiplayer issue with one player per force. In this case, the second player hadn't joined the game yet and force data for that player's force had been removed. The fix is trivial, just hide lines 114-117 of scripts/player_functions.lua behind an if-then-statement:

if f_data then
    f_data.show_shortcuts = unlock_shortcut
    GCKI.writeDebug("%sabled shortcut %s!",
                          {unlock_shortcut and "En" or "Dis",
                        GCKI.enquote(GCKI.shortcut_name)})
end

I've found another problem that I want to fix before updating. Hope this doesn't take too long. :-)

11 months ago

Ok, works fine now!
Thanks a lot.

11 months ago

You're welcome! Please try out version 1.1.13, I've fixed the other bug now as well. :-)

New response