Page 1 of 1
control.lua: attempt to index global
Posted: Sun Oct 27, 2024 3:27 pm
by hidingfox
Look, I have no idea how to mod. I just wanted to make a mod work, that was working in 1.1. The original creator haven't updated it in 6 months. I went through the changelog and fixed stuff in entity.lua and item.lua. But don't really understand what's wrong with control.lua
The file is attached if someone can take a look?
Thanks
Re: control.lua: attempt to index global
Posted: Sun Oct 27, 2024 5:39 pm
by Silari
'global' was renamed to 'storage' in 2.0. You need to find anywhere that tries to access global and update the name.
Re: control.lua: attempt to index global
Posted: Thu Oct 31, 2024 8:43 am
by hidingfox
Silari wrote: ↑Sun Oct 27, 2024 5:39 pm
'global' was renamed to 'storage' in 2.0. You need to find anywhere that tries to access global and update the name.
thanks!
I tried a few things and it still doesn't work as intended. Real shame
Re: control.lua: attempt to index global
Posted: Thu Oct 31, 2024 9:43 am
by Pi-C
hidingfox wrote: ↑Thu Oct 31, 2024 8:43 am
I tried a few things and it still doesn't work as intended. Real shame
The update to Factorio 2.0 came with some drastic changes: 'global' was renamed, things like 'game.prototypes' have been moved to 'prototypes' etc.
Here is the preview of the changes posted in preparation for 2.0. If you read through it, you may find the things that don't work for you. If you're in luck, you may find that just renaming a few things may fix your bug. Of course, some more changes (e.g. in regard to logistic networks) are not quite as easy to fix. Post some more details when you see such problems!
You may also want to check out the
Factorio API Docs.