I'm trying to update my mod to .17 and keep getting an invalid prototype array error. Any help would be appreciated thanks!
https://github.com/theradman221/Compressed-Materials
Mod GithubInvalid Prototype Array Error
-
- Inserter
- Posts: 40
- Joined: Sun Feb 22, 2015 7:54 pm
- Contact:
Re: Invalid Prototype Array Error
Not sure, but it looks like the error comes from data:extend
Try to make it deeper:
data:extend({compress_recipes})
or
Note that you get error if you extend with nil or {}
Try to make it deeper:
data:extend({compress_recipes})
or
Code: Select all
for i, recipe in pairs (compress_recipes) do
data:extend({recipe})
end
-
- Inserter
- Posts: 40
- Joined: Sun Feb 22, 2015 7:54 pm
- Contact:
Re: Invalid Prototype Array Error
Thanks that seems to have fixed it! Now it's just not picking up any items or recipes.
Re: Invalid Prototype Array Error
theradman221 wrote: Tue Apr 09, 2019 3:55 pm Thanks that seems to have fixed it! Now it's just not picking up any items or recipes.
Code: Select all
for i, recipe in pairs (compress_items) do
data:extend({item})
end

-
- Inserter
- Posts: 40
- Joined: Sun Feb 22, 2015 7:54 pm
- Contact:
Re: Invalid Prototype Array Error
thanks for seeing that, I guess i've been staring at it too long to notice....
Dang, after editing it it's still not working
Dang, after editing it it's still not working
Re: Invalid Prototype Array Error
Just add more debug information, check if some prototypes are not correctly generated. Without debug info it's really difficult.theradman221 wrote: Tue Apr 09, 2019 7:33 pm thanks for seeing that, I guess i've been staring at it too long to notice....
Dang, after editing it it's still not working
I'm using this mod to check what exactly changing has made the code.
-
- Inserter
- Posts: 40
- Joined: Sun Feb 22, 2015 7:54 pm
- Contact:
Re: Invalid Prototype Array Error
I'll download that mod and look at it, unfortunately college is keeping me quite busy and I've just been working on this whenever I have a few minutes.