Page 1 of 1

[0.13.17] Error in IDConnector

Posted: Mon Aug 22, 2016 4:00 pm
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

Re: [0.13.17] Error in IDConnector

Posted: Mon Aug 22, 2016 4:10 pm
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)

Re: [0.13.17] Error in IDConnector

Posted: Mon Aug 22, 2016 4:13 pm
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.

Re: [0.13.17] Error in IDConnector

Posted: Mon Aug 22, 2016 4:56 pm
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