Template:Recipe: Difference between revisions

From Against the Storm Official Wiki
m (changed preview to pickled goods for testing)
m (wrong nowiki description)
Line 3: Line 3:
This template calls renderRecipe, which writes out either ONE recipe if the product and building is specified, ALL recipes for the specified product, or ALL recipes at a specified building.
This template calls renderRecipe, which writes out either ONE recipe if the product and building is specified, ALL recipes for the specified product, or ALL recipes at a specified building.


For example: <code><nowiki>{{Recipe|Biscuits|Cookhouse}}</nowiki></code> yields:
For example: <code><nowiki>{{Recipe|Coal|Kiln}}</nowiki></code> yields:
{{Recipe|Coal|Kiln}}
{{Recipe|Coal|Kiln}}



Revision as of 14:29, 10 February 2023

RenderRecipe error: Invalid template parameters. This template requires at least a product or building.

This template calls renderRecipe, which writes out either ONE recipe if the product and building is specified, ALL recipes for the specified product, or ALL recipes at a specified building.

For example: {{Recipe|Coal|Kiln}} yields: Lua error in Module:RenderRecipe at line 106: attempt to call field 'getRecipeAtBuilding' (a nil value).


And another example: {{Recipe|Pickled Goods}} yields: Lua error in Module:RenderRecipe at line 120: attempt to call field 'getRecipeForProduct' (a nil value).


And a final example: {{Recipe||Scribe}} yields: Lua error in Module:RenderRecipe at line 142: attempt to call field 'getBuildingsRecipes' (a nil value).