Page 1 of 1

code help needed

Posted: Sat Aug 01, 2015 10:26 am
by bblewittAG
Hello, I am new to modding and I have not modded for a while on factorio so I might of lost information on how to do the most simple things + it has all changed now with what the old code was but learnt how to adjust it so that it would work but I have hit a snag and cannot find information about it to fix it myself so I have come asking how to fix it so that I can carry on testing my mods + experiment with ideas before I come up with a definite mod.

The mod that I have been working on is a item deleter mod where it just gets rid of those annoying items that you place down at the beginning but have no use for them late game. I have seen people have similar ideas but none the less no one can be original anymore with ideas.

This is the error that I keep getting:
Unknown key: "Error while running the on_init:
__void__/control.lua:5: attempt to index global
'glob' (a nil value)"

This is what the code is for that line.

Code: Select all

game.on_init(function()
  glob.void = {}
end)

Re: code help needed

Posted: Sat Aug 01, 2015 10:29 am
by orzelek
New name for glob is global.
I'd recommend reading 0.12 release notes - scripting section.

Re: code help needed

Posted: Sat Aug 01, 2015 10:51 am
by bblewittAG
okay thanks for the help orzelek.

I only code as a hobby so I don't look around that much unless someone like you have pointed it out.

sometimes it is good to ask to get a direct and informational answer from someone you knows a lot more than myself.