[0.13.17] Error in IDConnector

Bugs that are actually features.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

[0.13.17] Error in IDConnector

Post by LuziferSenpai »

So, i started to create a new Achievement and than the Games says:

Click

and i dond't know why?

I asked Klonan and Choumiko and both sayed there is no Problem in my Code:

Code: Select all

local MODNAME = "__No-Belts-Challenge__"

data:extend
(
{
 {
  type = "dont-build-entity-achievement",
  name = "no-belts-challenge",
  icon = MODNAME.."/no-belts.png",
  order = "f[limitation]-e[no-belts-challenge]",
  dont_build = {},
 }
}
)

for tb, belts in pairs(data.raw["transport-belt"]) do
	table.insert(data.raw["dont-build-entity-achievement"]["no-belts-challenge"].dont_build, belts)
end

for ub, underground in pairs(data.raw["underground-belt"]) do
	table.insert(data.raw["dont-build-entity-achievement"]["no-belts-challenge"].dont_build, underground)
end

for s, splitti in pairs(data.raw["splitter"]) do
	table.insert(data.raw["dont-build-entity-achievement"]["no-belts-challenge"].dont_build, splitti)
end
And Choumiko sayed: "i tried a few variations resulting in the same error."

I think this is a Bug, so i report it!

Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
Rseding91
Factorio Staff
Factorio Staff
Posts: 15911
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.17] Error in IDConnector

Post by Rseding91 »

Code: Select all

dont_build = {}
You have to define what it's meant to not allow building to unlock the achievement using strings and you're defining them as tables.

It should look something like this:

Code: Select all

dont_build = {"belt-1", "belt2"}
If you're doing that programmatically you'd: table.insert(dont_build, text_name)
If you want to get ahold of me I'm almost always on Discord.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: [0.13.17] Error in IDConnector

Post by LuziferSenpai »

Rseding91 wrote:

Code: Select all

dont_build = {}
You have to define what it's meant to not allow building to unlock the achievement using strings and you're defining them as tables.

It should look something like this:

Code: Select all

dont_build = {"belt-1", "belt2"}
If you're doing that programmatically you'd: table.insert(dont_build, text_name)
I can't use those for ... in the code to say thats don't build? D:
Whats going on.
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.13.17] Error in IDConnector

Post by Choumiko »

Try this one:

Code: Select all

    for tb, belts in pairs(data.raw["transport-belt"]) do
       table.insert(data.raw["dont-build-entity-achievement"]["no-belts-challenge"].dont_build, tb)
    end

    for ub, underground in pairs(data.raw["underground-belt"]) do
       table.insert(data.raw["dont-build-entity-achievement"]["no-belts-challenge"].dont_build, ub)
    end

    for s, splitti in pairs(data.raw["splitter"]) do
       table.insert(data.raw["dont-build-entity-achievement"]["no-belts-challenge"].dont_build, s)
    end
Yuu might need to do the data:extend after you added the restrictions
Post Reply

Return to “Not a bug”