Factorio 1.101 (steam verified files) started randomly crashing/closing frequently. So If you load my save file [with the mods] it should or can produce the factorio-current.log during loading the save file. The crashes are so randomly that it can happen also after saving a save file or etc.
The logs always seem to end with:
576.654 Checksum for script __AutoDeconstruct__/control.lua: 1402689405
The mod Editor Extensions is also spamming in the log:
Verbose PrototypeMigrationList.cpp:338: "ee-debug-world-start-in-editor" mentioned as TO in prototype migration was not found in the map prototype dictionary, ignoring ...
[1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"
[1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"
- Attachments
-
- RecipeBook_4.0.0.zip
- experimental EA from raiguard if needed but I think its not.
- (63.21 KiB) Downloaded 41 times
-
- flib_0.14.0.zip
- experimental EA from raiguard if needed but I think its not.
- (583.08 KiB) Downloaded 36 times
-
- Testing non square line Blocks.zip
- the save file if needed
- (20.6 MiB) Downloaded 40 times
-
- settings.json
- .vscode.settings if needed-idk how It got there tbh
- (813 Bytes) Downloaded 30 times
-
- info.json
- my mod 1/2 if needed
- (252 Bytes) Downloaded 38 times
-
- control.lua
- my mod 2/2 if needed
- (1.5 KiB) Downloaded 36 times
-
- factorio-previous.log
- also crash
- (1.92 MiB) Downloaded 35 times
-
- factorio-current.log
- crash during loading the save file
- (973.9 KiB) Downloaded 36 times
Re: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"
Tell the mod author.393.780 Error MainLoop.cpp Exception at tick 7404444: Die Mod Biter sabotage (0.1.0) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.
Error while running event biter-sabotage::on_built_entity (ID 6)
__biter-sabotage__/control.lua:7: bad argument #2 of 3 to 'print' (table expected, got string)
stack traceback:
[C]: in function 'print'
__biter-sabotage__/control.lua:7: in function <__biter-sabotage__/control.lua:3>
Re: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"
I am the mod author and I can tell you that that specifically unrecoverable error was because of me trying to get the print function to work with a string "" and a variable. Lua in VSC recommended me to separate them with commas but that caused that bad argument error so that error in particular had nothing to do with the issues I was experiencing. These crashes had no log trace print to them. That is the Problem. If it would have been a normal exit the logs would end with Good Bye. They do not.
Re: [1.101] frequent crashing ending log with mod "AutoDeconstruct control.lua"
This is the crashing line:
This should work:
The '..' is the operator for concatenating strings. Alternatively, you could use this:
Using a table is similar to using localised text, where you give a table containing a template (in this case: the empty string "") and optional additional arguments (in this case: "You built " and event.created_entity.name). As an empty template is used here, all the optional arguments will be concatenated unless they are nil.
Note: Your string is not a localised string because "You built " will be output no matter what language the player is using. You could add a template for this message by adding something like this to your locale file:
Then change the print line to
Once you've restarted the game (so it will know about the new strings), this string will be translated to the player's language if "my-messages.built" has been added to that language's locale file; if it hasn't been translated to that language yet, the English version will be used as fallback.
For more detailed information on localization, there's a tutorial you should check out.
Code: Select all
player.print("You built "event.created_entity.name)
Code: Select all
player.print("You built "..event.created_entity.name)
Code: Select all
player.print( {"", "You built ", event.created_entity.name} )
Note: Your string is not a localised string because "You built " will be output no matter what language the player is using. You could add a template for this message by adding something like this to your locale file:
Code: Select all
[my-messages]
built=You built __1__
Code: Select all
player.print( {"my-messages.built", event.created_entity.name} )
For more detailed information on localization, there's a tutorial you should check out.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!