Why is this code giving me an error?

I am making a bow for a little mod of mine but whenever I do the build+reload thing it says, "error CS0116: A namespace cannot directly contain members such as fields or methods warnings"
Here is my code:
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace beepy.Items
{
  public class Nature_Fury : ModItem
  {
  public override void SetStaticDefaults()
  {
  DisplayName.SetDefault("Nature Fury");
  Tooltip.SetDefault("Blessed by a long forgotten dryad");
  }

  public override void SetDefaults()
  {
  item.damage = 65;
  item.ranged = true;
  item.width = 24;
  item.height = 42;
  item.maxStack = 1;
  item.useTime = 20;
  item.useAnimation = 20;
  item.useStyle = 5;
  item.knockBack = 2;
  item.value = 1200000;
  item.rare = 3;
  item.UseSound = SoundID.Item5;
  item.noMelee = true;
  item.shoot = 1;
  item.useAmmo = AmmoID.Arrow;
  item.shootSpeed = 10f;
  item.autoReuse = true;
  }
  }
  public override void AddRecipes()
 
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.JungleSpores, 30);
            recipe.AddIngredient(ItemID.Stinger, 25);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
}
Can someone tell me what is causing the issue? Thanks in advance.
 
You are closing the class after SetDefaults, but there's still one method below it.

Move one of the double parentheses (the } thingy) after SetDefaults to after AddRecipes.
 
Back
Top Bottom