Page 1 of 1

recipe.product.type doesn't return string but number

Posted: Sat May 21, 2016 11:08 pm
by MrDoomah
When calling

Code: Select all

game.forces.player.recipes['any recipe'].product.type
it return 0 or 1 (the numbers) instead of "item" or "fluid" (the strings) as the api indicates.

Re: recipe.product.type doesn't return string but number

Posted: Mon May 23, 2016 9:49 am
by Klonan
Thanks for the report,
Can confirm it return a number, not the name:
Image

Re: recipe.product.type doesn't return string but number

Posted: Wed May 25, 2016 11:51 am
by Oxyd
Thanks. Also, product.amount is a floating-point number, not an uint.

The docs will be fixed in the next release.