diff --git a/stdlib/event/event.lua b/stdlib/event/event.lua index 4b568426..56eb6fbc 100644 --- a/stdlib/event/event.lua +++ b/stdlib/event/event.lua @@ -65,7 +65,7 @@ if not config.skip_script_protections then -- Protections for post and pre regis end for name in pairs(Event.script) do _G.script[name] = function(id) - error('Detected attempt to register an event using script.' .. name .. ' while using the STDLIB event system ' .. id and id or '') + error('Detected attempt to register an event using script.' .. name .. ' while using the STDLIB event system ' .. (id and id or '')) end end end diff --git a/stdlib/event/trains.lua b/stdlib/event/trains.lua index de8f9c0c..0083b025 100644 --- a/stdlib/event/trains.lua +++ b/stdlib/event/trains.lua @@ -23,7 +23,7 @@ local table = require('__stdlib__/stdlib/utils/table') -- @tparam uint new_id the ID of the train after the change -- @usage ---- Event.register(Trains.on_train_id_changed, my_handler) -Trains.on_train_id_changed = script.generate_event_name() +Trains.on_train_id_changed = Event.generate_event_name() --- Given a @{criteria|search criteria}, search for trains that match the criteria. -- * If ***criteria.surface*** is not supplied, this function searches through all existing surfaces.