LuaControl.get_craftable_count doesnt work for LuaRecipe

Place to get help with not working mods / modding interface.
Post Reply
unobtanium
Inserter
Inserter
Posts: 31
Joined: Fri Nov 04, 2016 11:58 am
Contact:

LuaControl.get_craftable_count doesnt work for LuaRecipe

Post by unobtanium »

Just tried to pass a LuaRecipe to the get_craftable_count function and it returned

Code: Select all

 #-1 to 'get_craftable_count' (string expected, got table)
In the API documentation it says, i can either pass a string or an entire LuaRecipe. Passing a string works (e.g. extracting the name out of the LuaRecipe), but passing the whole LuaRecipe does not.

Tested this in version 0.15.40.

LuaControl.get_craftable_count

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: LuaControl.get_craftable_count doesnt work for LuaRecipe

Post by DaveMcW »

Confirmed in 0.16.20. This should be reported as a bug.

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

Re: LuaControl.get_craftable_count doesnt work for LuaRecipe

Post by Rseding91 »

DaveMcW wrote:Confirmed in 0.16.20. This should be reported as a bug.
I've fixed it for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.

unobtanium
Inserter
Inserter
Posts: 31
Joined: Fri Nov 04, 2016 11:58 am
Contact:

Re: LuaControl.get_craftable_count doesnt work for LuaRecipe

Post by unobtanium »

Thanks a lot!

Post Reply

Return to “Modding help”