Click here to Skip to main content
15,034,865 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I just started modding a week ago so im just following tutorials so i don't know whats wrong! can you help me? The error is "Item does not contain definition for name and tooltip"
Here's my code!



using Terraria.ID;
using Terraria.ModLoader;

namespace TheGunMod.Items.Weapons
{
public class BoulderBullet : ModItem
{
public override void SetDefaults()
{
item.name = "BoulderBullet";
item.damage = 200;
item.ranged = true;
item.width = 8;
item.height = 8;
item.maxStack = 999;
item.toolTip = "The Evil Boulder Has Been Caught";
item.consumable = true;
item.knockBack = 1.5f;
item.value = 10;
item.rare = 2;
item.shoot = mod.ProjectileType("BoulderBullet");
item.shootSpeed = 15f;
item.ammo = ProjectileID.Bullet;
}
public override void AddRecipes()
{

ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.StoneBlock, 6);
recipe.AddTile(TileID.HeavyWorkBench);
recipe.SetResult(this, 20);
recipe.AddRecipe();
}
}
}

What I have tried:

I don't know how to start so I haven't tried anything!
Posted
Comments
Richard MacCutchan 22-Jun-20 4:19am
   
Where is the definition of the item object?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900