Page 1 of 1

[0.14.21] util.lua error with a 279 hr 20 min + map

Posted: Wed Jan 18, 2017 4:53 pm
by Gemoron
Hello,

I am currently trying a modded map which highly increased material demands and research requirements which let me play the map a looong time.

This map has over 279hr and 20 min runtime by now and it consistently throws the following error:

Code: Select all

Error while running event on_tick(ID 0)
...team/steamapps/common/Factorio/data/core/lualib/util.lua:64: bad argument #2 to 'format'
(not a number in proper range)
I've checked the mentioned luascript and it shows the following code:

Code: Select all

function formattime(ticks)
  local seconds = ticks / 60
  local minutes = math.floor((seconds)/60)
  local seconds = math.floor(seconds - 60*minutes)
  return string.format("%d:%02d", minutes, seconds)
end
The code is from the basegame. Is it an integer overflow of some kind?

The pack and mods have been updates this morning.
Modpack link: https://www.dropbox.com/s/6udtiyqqjb8ni ... s.zip?dl=0

Re: [0.14.21] util.lua error with a 279 hr 20 min + map

Posted: Wed Jan 18, 2017 7:47 pm
by Rseding91
You'll need to talk to the mod authors to have them fix the error with their mods.

Re: [0.14.21] util.lua error with a 279 hr 20 min + map

Posted: Thu Jan 19, 2017 6:31 pm
by Adil
After grep through the mods I can tell that only "research-queue_1.4.3" is using formattime function.
But shouldn't the mod name be listed in the error message?

Re: [0.14.21] util.lua error with a 279 hr 20 min + map

Posted: Thu Jan 19, 2017 10:07 pm
by DaveMcW
It's a design flaw in the util library. It has no way of identifying mods that use it incorrectly.