Fish and Wildlife


Adds regrowing trees and respawning fish.

Content
4 years ago
0.15 - 0.18
53
Environment

b Error with Disco Science

5 years ago
(updated 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

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

Thank you for the quick response and fix.

5 years ago

I haven't uploaded my fix yet though :D

I've made my changes locally so they'll be included with the next update, whenever I finish a few more changes (mainly, adding mod settings).

New response