code help needed

Place to get help with not working mods / modding interface.
bblewittAG
Inserter
Inserter
Posts: 29
Joined: Tue Sep 16, 2014 8:27 pm
Contact:

code help needed

Post 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)
orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: code help needed

Post by orzelek »

New name for glob is global.
I'd recommend reading 0.12 release notes - scripting section.
bblewittAG
Inserter
Inserter
Posts: 29
Joined: Tue Sep 16, 2014 8:27 pm
Contact:

Re: code help needed

Post 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.
Post Reply

Return to “Modding help”