Probabilty results

Place to get help with not working mods / modding interface.
User avatar
Lutra
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 01, 2016 9:22 pm
Contact:

Probabilty results

Post by Lutra »

on the 0.12.30 API page (http://lua-api.factorio.com/), recipe results can be listed as:

Code: Select all

result =  {{type="item",name="custom-item", probability=0.5, amount_min=1, amount_max=5}}
However, when i use

Code: Select all

result = {{type = "item", name="plant-cell", probability=0.75, amount_min=1, amount_max = 10}}
i get an error at runtime saying (recipe): 'result not defined correctly'

WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Probabilty results

Post by prg »

"results", not "result".
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Lutra
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Apr 01, 2016 9:22 pm
Contact:

Re: Probabilty results

Post by Lutra »

:oops: ah. damn. thanks for that :D
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Post Reply

Return to “Modding help”