Disco Science


Makes science labs light up with the colours of the science packs they are consuming.

Tweaks
16 days ago
0.17 - 1.1
172K

b [Fixed] Error with Fish and Wildlife

5 years ago

I'm not sure if this is Fish and Wildlife or Disco Science,
I got this error a moment ago while playing:

"The mod Fish and Wildlife caused a non-recoverable error.
Please report this error to the mod author.

Error while running event fws::on_tick (ID 0)
The mod Disco Science caused a non-recoverable error.
Please report this error to the mod author.

Error while running event DiscoScience::script_raised_built (ID 77)
Map doesn't contain 1 player, this function can't be used
stack traceback:
DiscoScience/control.lua:18: in function 'showModError'
DiscoScience/control.lua:89: in function 'addLab'
DiscoScience/control.lua:226: in function <DiscoScience/control.lua:225>
stack traceback:
[C]: in function 'show_message_dialog'
DiscoScience/control.lua:18: in function 'showModError'
DiscoScience/control.lua:89: in function 'addLab'
DiscoScience/control.lua:226: in function <DiscoScience/control.lua:225>
stack traceback:
fws/control.lua:565: in function 'VisitChunk'
fws/control.lua:358: in function <fws/control.lua:347>
stack traceback:
[C]: in function 'raise_event'
fws/control.lua:565: in function 'VisitChunk'
fws/control.lua:358: in function <fws/control.lua:347>

5 years ago

Thanks for the report. This should be addressed in 0.1.4.

5 years ago

This happens because FWS spawned a fish, called the mod event "script_raised_built," and passed the created entity in event.created_entity (to better match on_built_entity and on_robot_built_entity) but Disco looks for it in event.entity (similar to the mined/destroyed events), and then Disco tries to display an error about getting nil but uses game.show_message_dialog which is not multiplayer compatible. I will change FWS so event.entity also references the [fish], but DiscoScience should also change its method of error reporting (so I am crossposting).

5 years ago

Thanks Schmendrick! I think it's sorted now. I misread the API and thought show_message_dialog() would be a NOP in multiplayer.

5 years ago

Thank you for the quick response and fix.

New response