Wouldnt let me ammend this to my old question about the same script
Error: c:\Users\Hailey\Documents\My Games\Terraria\ModLoader\Mod Sources\SaobiesMod\Items\Items\Suspicious Chunk.cs(35,26) : error CS0115: 'SaobiesMod.Items.ItemName.AddRecipe()': no suitable method found to override
Full script:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace SaobiesMod.Items
{
public class ItemName : ModItem
{
public override void SetDefaults()
{
item.name = "Suspicious Chunk";
item.width = 20;
item.height = 20;
item.maxStack = 20;
AddTooltip("A weird hunk of various minerals.";
item.value = 100;
item.rare = 1;
item.useAnimation = 30;
item.useTime = 30;
item.useStyle = 4;
item.consumable = true;
}
public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(mod.NPCType("Gouzibal"));
return !Main.dayTime;
}
public override bool UseItem(Player player)
{
NPC.SpawnOnPlayer(plaer.whoAmI, mod.NPCType("Gouzibal"));
Main.PlayerSound(15, (int)player.position.X (int)player.position.Y, 0);
return true;
}
public override void AddRecipe()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID:MeteoriteBar, 10);
recipe.AddIngredient(ItemID:Ruby, 3);
recipe.AddIngredient(ItemID:StoneBlock, 250);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
What I have tried:
I tried removing the ; after AddRecipe(), and that lead to the game saying the same thing. Im brand new to coding, so i dont know what else i could do to fix it
EDIT: Iv also tried changing "public override void AddRecipe()" to "public class Addrecipe()". It returned by saying "{ expected". Even after adding one at the end of the line, it still said this. I added like 3 and after still getting that error returned the code back to how it was "public override void AddRecipe()"