Page 1 of 1

does not contain key oninit [fixed]

Posted: Thu Jul 02, 2015 7:14 pm
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

Re: does not contain key oninit

Posted: Thu Jul 02, 2015 7:29 pm
by prg
Maybe try game.oninit instead.

Re: does not contain key oninit

Posted: Thu Jul 02, 2015 7:32 pm
by matjojo
prg wrote:Maybe try game.oninit instead.

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