Actual Craft Time


Display actual craft times for assemblers, furnaces and rocket silo

Utilities
4 years ago
0.16 - 1.1
17.3K

b Crash with Version 0.17.64

5 years ago
(updated 5 years ago)

When clicking the arrow buttons to see how much 2 or more of a specific machine will craft the game crashes.
The error given is:

Error while running event Actual_Craft_timne::on_gui_click (ID 1)
(number expected, got nil)
stack traceback:
[C]: in function 'sub'
Actual_Craft_Time/control.lua:658: in function 'playerSlid'
Actual_Craft_Time/control.lua:859: in function
<Actual_Craft_Time/control.lua:786>

This didn't occur with version 0.17.63

5 years ago

This is due to 17.64 changes. Specifically:
-Removed the ability to convert a table address into a string
logging sliderLabelCaption returns "table", so when trying to sub anything from it as a string, nothing happens and the crash happens because you're trying to find a substring in something that isn't a string

5 years ago
(updated 5 years ago)

A fix is to replace line 657 from

local sliderLabelCaption = tostring(playersGui["ACT-frame_"..event.player_index]["machineFlow"]["sliderFlow"]["sliderLabel"].caption)

to

local sliderLabelCaption = playersGui["ACT-frame_"..event.player_index]["machineFlow"]["sliderFlow"]["sliderLabel"].caption[3]

Be warned, I haven't extensively tested it at all, use at your own risk

5 years ago

this occurs in my game:
Error while running event Actual_Craft_Time::on_gui_value_changed (ID 85)
Actual_Craft_Time/control.lua:658: bad argument #2 of 3 to 'sub' (number expected, got nil)
stack traceback:
[C]: in function 'sub'
Actual_Craft_Time/control.lua:658: in function <Actual_Craft_Time/control.lua:651>

5 years ago

Mine is showing almost the same but different:
Error while running event Actual_Craft_Time::on_gui_value_changed (ID 85)
Actual_Craft_Time/control.lua:658: bad argument #2 of 3 to 'sub' (number expected, got nil)
stack traceback:
[C]: in function 'sub'
Actual_Craft_Time/control.lua:658: in function
<Actual_Craft_Time/control.lua:651>

I am going to try PParrot's hotfix to see if that works until the next update. I will edit if that leads to a different crash at some point.

5 years ago

Mod Actual Craft Time hat einen unbehebbaren Fehler verursacht.
Bitte informiere den Mod-Autor über diesen Fehler.

Error while running event Actual_Craft_Time::on_gui_click (ID 1)
Actual_Craft_Time/control.lua:658: bad argument #2 of 3 to 'sub' (number expected, got nil)
stack traceback:
[C]: in function 'sub'
Actual_Craft_Time/control.lua:658: in function 'playerSlid'
Actual_Craft_Time/control.lua:856: in function <Actual_Craft_Time/control.lua:786>

5 years ago

The mod Actual Craft Time caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Actual_Craft_Time::on_gui_click (ID 1)
Actual_Craft_Time/control.lua:658: bad argument #2 of 3 to 'sub' (number expected, got nil)
stack traceback:
[C]: in function 'sub'
Actual_Craft_Time/control.lua:658: in function 'playerSlid'
Actual_Craft_Time/control.lua:856: in function <Actual_Craft_Time/control.lua:786>

5 years ago

Thanks PParrot, your fix seems to work perfectly fine, and I haven't been able to make it crash so it seems stable enough.

5 years ago

Seconded on the fix from PParrot. I have played for about 6 hours with no issues.

5 years ago

Yes, thank you PParrott. For anyone following his advice, the modification he suggests is in the control.lua file.

5 years ago

I cannot find the path to control.lua file please help.

5 years ago

I cannot find the path to control.lua file please help. (Think I found it)

5 years ago

Can someone please fork this with the corrected line from PParrott

5 years ago

Still occurs in Base 0.17.68 and ACT 0.3.9, with similar messages as above.

I really appreciate this mod and all the work you've put into it! It's saved me so many, many spreadsheets...

5 years ago

Bug is still not fixed in mod portal release, thus unable to synchronize it from server with a working version.

New response