Page 1 of 1

[2.0.28] Type mismatch between generate_event_name and raise_event

Posted: Tue Dec 24, 2024 1:28 pm
by Cooldude2606
TL:DR The output type of LuaBootstrap::generate_event_name can not be given as input to LuaBootstrap::raise_event.

The return type of LuaBootstrap::generate_event_name is "defines.events"
The input type of LuaBootstrap::raise_event is "uint or string"
This works at runtime but the types are not soundly defined, and so is a documentation issue.

I would suggest using "LuaEventType" which is used as the input for LuaBootstrap::on_event

Re: [2.0.28] Type mismatch between generate_event_name and raise_event

Posted: Fri Jan 10, 2025 5:55 pm
by Cooldude2606
The suggested change was implemented in 2.0.29