control.lua:
Code: Select all
require "mid"
script.on_event(defines.events.on_player_created, function(event)
functiont1(event)
functiont2(event)
functiont3(event)
end)
Code: Select all
local function whatever(event)
local player = game.players[event.player_index]
player.insert{name="iron-plate", count=10}
end
Event.register(defines.events.on_player_created, whatever)
mid.lua:6: > Event.register(defines.events.on_player_created, whatever)