[2.0.28] Type mismatch between generate_event_name and raise_event

User avatar
Cooldude2606
Fast Inserter
Fast Inserter
Posts: 108
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

[2.0.28] Type mismatch between generate_event_name and raise_event

Post 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
Last edited by Cooldude2606 on Fri Jan 10, 2025 5:56 pm, edited 1 time in total.
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---
User avatar
Cooldude2606
Fast Inserter
Fast Inserter
Posts: 108
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

Re: [2.0.28] Type mismatch between generate_event_name and raise_event

Post by Cooldude2606 »

The suggested change was implemented in 2.0.29
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---
Post Reply

Return to “Resolved Requests”