Mech Engineer

Mech Engineer

View Stats:
Arhely 8 Jul, 2024 @ 2:14pm
Mods-related error: null value
Every mod, even the example magic wand, breaks the game causing this error when trying to load any save or create one:

[string "
..."]:6: bad argument #1 to 'getupvalue' (function expected, got nil)
stack traceback:
[C]: in function 'debug.getupvalue'
[string "
..."]:6: in upvalue 'setfenv'
[string "
..."]:41: in function 'loadMod' undefined

The funniest part is that the game doesn`t just crash - it actually loads\creates the save and renders 1 frame every time the OK button in the error window is pressed, but then the error occurs again. After a few times, another error takes its place:

[string "
..."]:64: attempt to call a nil value (field 'language')
stack traceback:
[string "
..."]:64: in function 'obj_database_language' undefined

This happens only once. Then another:

[string "
..."]:59: attempt to call a nil value (field 'draw_top_menu')
stack traceback:
[string "
..."]:59: in function 'obj_database_draw_top_menu' undefined

Same thing happens when I run tests on all branches available, in any way available - even manual installation of a mod in the local folder. The weirdest sh*t is that in spite of all this, the game actually works and loads both language and menu if you click OK on all these errors. I`d test things further, but it`s almost impossible with 1fps.
Anyways, I`m not good with Lua, but I`m sure that if language and menu draw really had been defined by null values, I wouldn`t get a normal drawing menu with russian text. Idk what`s wrong with this.
Last edited by Arhely; 8 Jul, 2024 @ 2:21pm
< >
Showing 1-2 of 2 comments
KiberKreker  [developer] 9 Jul, 2024 @ 11:06pm 
the magic wand is outdated.
just tested and Autocannon mod works for me. idk what causes it for you.
there is no function "language" in obj_database.lua it shouldn't even try to find it
Arhely 9 Jul, 2024 @ 11:19pm 
Huh, that explains why the game still works even after all the errors - that`s basically false alarm. Ty, I`ll figure something out.
< >
Showing 1-2 of 2 comments
Per page: 1530 50