Invalid Prototype Array Error

Place to get help with not working mods / modding interface.
Post Reply
theradman221
Inserter
Inserter
Posts: 40
Joined: Sun Feb 22, 2015 7:54 pm
Contact:

Invalid Prototype Array Error

Post by theradman221 »

I'm trying to update my mod to .17 and keep getting an invalid prototype array error. Any help would be appreciated thanks!
Error
Error
error prototype.PNG (15.14 KiB) Viewed 1691 times
Mod Github
https://github.com/theradman221/Compressed-Materials

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Invalid Prototype Array Error

Post by darkfrei »

Not sure, but it looks like the error comes from data:extend
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
Note that you get error if you extend with nil or {}

theradman221
Inserter
Inserter
Posts: 40
Joined: Sun Feb 22, 2015 7:54 pm
Contact:

Re: Invalid Prototype Array Error

Post by theradman221 »

Thanks that seems to have fixed it! Now it's just not picking up any items or recipes.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Invalid Prototype Array Error

Post by darkfrei »

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
:arrow: in the first line is "recipe", but the second is "item"

theradman221
Inserter
Inserter
Posts: 40
Joined: Sun Feb 22, 2015 7:54 pm
Contact:

Re: Invalid Prototype Array Error

Post by theradman221 »

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

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Invalid Prototype Array Error

Post by darkfrei »

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
Just add more debug information, check if some prototypes are not correctly generated. Without debug info it's really difficult.

I'm using this mod to check what exactly changing has made the code.

theradman221
Inserter
Inserter
Posts: 40
Joined: Sun Feb 22, 2015 7:54 pm
Contact:

Re: Invalid Prototype Array Error

Post by theradman221 »

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.

Post Reply

Return to “Modding help”