Page 1 of 1
Invalid prototype array
Posted: Thu Aug 08, 2019 9:32 pm
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?
Re: Invalid prototype array
Posted: Fri Aug 09, 2019 9:12 am
by Klonan
Can you post your code?
Re: Invalid prototype array
Posted: Fri Aug 09, 2019 11:04 am
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.
Re: Invalid prototype array
Posted: Fri Aug 09, 2019 11:12 pm
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.