[SOLVED][0.18.18] Compatibility with older versions
[SOLVED][0.18.18] Compatibility with older versions
I am able to start multiple servers with the same scenario. The function "game.reset_time_played()" does not yet exist in 0.17.79. I am looking for a variable (script.version, game.version, global.version) with which I can bridge the function. The only variable I found is _VERSION, this is the Lua version, but it doesn't help me.
Last edited by XaLpHa89 on Mon Apr 13, 2020 9:31 am, edited 1 time in total.
Re: [0.18.18] Compatibility with older versions
You have access to the active mods, and considering that the game basically is the base mod, you should be able to get the game version this way:XaLpHa89 wrote: Mon Apr 13, 2020 3:18 am I am able to start multiple servers with the same scenario. The function "game.reset_time_played()" does not yet exist in 0.17.79. I am looking for a variable (script.version, game.version, global.version) with which I can bridge the function. The only variable I found is _VERSION, this is the Lua version, but it doesn't help me.
Code: Select all
local version = game.active_mods["base"]
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!