error when reloading mod

so let me explain the problem so basically I am trying to make a item for my mod Ive followed quite a bit tutorials and ive read some posts but im confused some can anyone help or is this a lost cause


errors shown : an error ocurred while building (mymod)
compiling (modname).XNAddl failed with 8 errors and c:/users/(name)/docs/mygames/terraria/mod loader /mod sources/(modname)/obj/release/net45/(modname).assemblyinfo.cs(14,11) : error cso579
C++:
using Terraria.ID;
using Terraria.ModLoader;

namespace VoyasApoc.Items
{
    public class sharpknife : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("sharp knife");
            Tooltip.SetDefault("wait whats this red liquid?.");
        }

        public override void SetDefaults()
        {
            item.damage = 25;
            Items.crit = 6;
            item.melee = true;
            item.width = 20;
            item.height = 20;
            item.useTime = 1;
            item.useAnimation = 10;
            item.useStyle = 3;
            item.knockBack = 4;
            item.value = 1000;
            item.rare = 5;
            item.UseSound = SoundID.Item1;
            item.autoReuse = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.IronBar, 10);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
 

Attachments

  • sharpknife.cs
    869 bytes · Views: 65
Last edited:
I have been having the same problem, every time I change something when starting a mod, it won't build because of this.
 
Found a solution for you if you haven't gotten one already. Delete the (modname).assemblyinfo.cs file each time you get that error. Fixed my issue. Make sure you delete the one giving you problems though.
 
Back
Top Bottom