help please

2grufs

Skeletron Prime
keep getting this error
Items/Weapons/HerosBlade
at Terraria.ModLoader.Mod.GetTexture(String name)
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

here's code
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ApocalypseMOD.Items.Weapons
{
public class HerosBlade : ModItem
{
public override void SetDefaults()
{
item.name = "HerosBlade"; //the name displayed when hovering over the Weapon ingame.
item.damage = 175;
item.melee = true;
item.width = 75;
item.height = 75;
item.toolTip = "blade of legends.";
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 10;
item.value = Item.buyPrice(0, 0, 0, 10); // How much the item is worth, in copper coins, when you sell it to a merchant. It costs 1/5th of this to buy it back from them. An easy way to remember the value is platinum, gold, silver, copper or PPGGSSCC (so this item price is 10gold)
item.rare = 10;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{ //this is how to craft this item
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 50);
recipe.AddTile(TileID.WorkBenches); //this is where to craft the item ,WorkBenches = all WorkBenches Anvils = all anvils , MythrilAnvil = Mythril Anvil and Orichalcum Anvil, Furnaces = all furnaces , DemonAltar = Demon Altar and Crimson Altar , TinkerersWorkbench = Tinkerer's Workbench
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.Next(3) == 0)
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, mod.DustType("Sparkle"));
//Emit dusts when swing the sword
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.OnFire, 60);
}
}
}

sorry, i'm quite new to this
this code was taken and modified from the example mod.
 
You're missing a texture for your sword. Put a texture file in the same directory with the same exact name as the class.

If you need to make one, start by using the texture of any other sword as a template (download the textures from the wiki) and modify it to your liking. Or you can just make a sword texture from scratch. A good size is anywhere from 40x40 to 64x64.

A good website to use for sprite creation is PiskelApp. Google that.
 
Back
Top Bottom