does not contain key oninit [fixed]

Place to get help with not working mods / modding interface.
Post Reply
matjojo
Filter Inserter
Filter Inserter
Posts: 337
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

does not contain key oninit [fixed]

Post by matjojo »

So when creating a mod I am wrinting I came across this wierd errormessage:

Code: Select all

__modname__/control.lua:7: LuaGameScript doesn't contain key oinit.
(this happens when creating a new map and loading a already existing map.)
But every piece of info I have read about this subject uses this.
This is a code snippet :

Code: Select all

require "util"
require "defines"
game.oinit(function()
--snip--
end)
Does anyone know what is happening or am i missing somthing very important?


Thanks in advance,
Matjojo
Last edited by matjojo on Thu Jul 02, 2015 7:32 pm, edited 1 time in total.

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: does not contain key oninit

Post by prg »

Maybe try game.oninit instead.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

matjojo
Filter Inserter
Filter Inserter
Posts: 337
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

Re: does not contain key oninit

Post by matjojo »

prg wrote:Maybe try game.oninit instead.

darn, thats lik extremely stupid, thanks for the heads up!

Post Reply

Return to “Modding help”