Zman350x
Steampunker
I want to make it so you can turn 5 mushrooms into 5 glowing mushrooms. So I look up how to make a custom recipe for a vanilla item. I then go to an already existing modded item, head to the recipe section, and paste this code
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Mushroom, 5);
recipe.SetResult(ItemID.GlowingMushroom, 5);
recipe.AddRecipe();
I load up the game and get this error
c:\Users\Zack\Documents\My Games\Terraria\ModLoader\Mod Sources\Ranged\Items\PokeyPokeyStick.cs(38,23) : error CS0128: A local variable named 'recipe' is already defined in this scope
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Mushroom, 5);
recipe.SetResult(ItemID.GlowingMushroom, 5);
recipe.AddRecipe();
I load up the game and get this error
c:\Users\Zack\Documents\My Games\Terraria\ModLoader\Mod Sources\Ranged\Items\PokeyPokeyStick.cs(38,23) : error CS0128: A local variable named 'recipe' is already defined in this scope