Invalid prototype array

Place to get help with not working mods / modding interface.
Post Reply
User avatar
TRUEpicness
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Wed Aug 09, 2017 8:21 pm
Contact:

Invalid prototype array

Post by TRUEpicness »

I am trying to make a greenhouse out of the base game assembly machine 3 so I copied over the AM3 entity info and changed what I needed but now it is
throwing an invalid prototype array error onto the screen and it beginning to be frustrating. I simply do not know how to fix it. Are there any ideas on how to fix it?
Attachments
dangit.png
dangit.png (70.66 KiB) Viewed 1297 times
1 more YouTube vid before bed *starts 24hr long vid*

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Invalid prototype array

Post by Klonan »

Can you post your code?

Adamo
Filter Inserter
Filter Inserter
Posts: 479
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: Invalid prototype array

Post by Adamo »

You might just need to add another {} around your prototype in data:extend(), like:

Code: Select all

data:extend({
{
  type = "assembling-machine",
  name = "whatever",
  all_your_other_fields = what_they_equal
}
})
If you missed that extra {}, you could get an error like this, I think. This is because data:extend is expecting a table of prototype tables.

User avatar
TRUEpicness
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Wed Aug 09, 2017 8:21 pm
Contact:

Re: Invalid prototype array

Post by TRUEpicness »

It works now! Thanks for the help.
Unfortunately, I have ran into another problem.
The green house entity sprite (same as the lab) does not show up ingame. The input pipe connection is there but the rest isn't. I'm sure I have told the game to look for the lab sprite.

I can't post the code right now as I'm not at my pc but I definitely will later.
1 more YouTube vid before bed *starts 24hr long vid*

Post Reply

Return to “Modding help”