I am quite new to LUA and I am having trouble with a simple (?) starting script. So far I have successfully created a mod which adds a few new items and recipes and also modifies existing ones. The existing recipes I modified work in a new game, but not in a loaded game, and the Modding FAQ tells me, to add two lines to my control.lua (see: https://wiki.factorio.com/index.php?title=Modding_FAQ) to fix this.
So this is my control.lua now, but when I load or start a game now, it throws the error: __FactorioVanillaExtended__/control.lua:4: unexpected symbol near ')'
Code: Select all
game.oninit(function()
for i, player in ipairs(game.players) do player.force.reset_recipes()
for i, player in ipairs(game.players) do player.force.reset_technologies()
end)
Thanks in advance...
Edit: Forgot to mention: I am testing on version 0.14.9