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

Bugs that are actually features.
Gemoron
Inserter
Inserter
Posts: 21
Joined: Sun Jun 29, 2014 3:01 pm
Contact:

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

Post 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
Attachments
error.PNG
error.PNG (20 KiB) Viewed 1769 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 14046
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

You'll need to talk to the mod authors to have them fix the error with their mods.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

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

Post 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?
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3713
Joined: Tue May 13, 2014 11:06 am
Contact:

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

Post by DaveMcW »

It's a design flaw in the util library. It has no way of identifying mods that use it incorrectly.

Post Reply

Return to “Not a bug”