Standalone [1.3] tModLoader - A Modding API

(God I'm posting so much lol) I got an error, and here is the error code and my code:

c:\Users\nick\Documents\My Games\Terraria\ModLoader\Mod Sources\TheOmegaMod\Items\Weapons\BladeOfVictory.cs(32,30) : error CS0161: 'TheOmegaMod.Items.Weapons.BladeOfVictory.Shoot(Terraria.Player, ref Microsoft.Xna.Framework.Vector2, ref float, ref float, ref int, ref int, ref float)': not all code paths return a value

The error says exactly what the problem is. If you look at the Shoot() method, it requires that a bool be returned and you aren't returning anything. To decide if you want to return true or false, you can go read the documentation for the method on the github wiki for ModItem: https://github.com/bluemagic123/tModLoader/wiki/ModItem
 
im getting an error about ItemID

using Terraria;
using Terraria.ModLoader;

namespace GamingsMod.Items.Weapons
{
public class DeathBringer : ModItem
{
public override void SetDefaults()
{
item.name = "Death Bringer";
item.damage = 40;
item.magic = true;
item.mana = 4;
item.width = 40;
item.height = 40;
item.toolTip = "Some say only few can use the staff without dying.";
item.useTime = 25;
item.useAnimation = 25;
item.useStyle = 5;
Item.staff[item.type] = true;
item.noMelee = true;
item.knockBack = 5;
item.value = 10000;
item.rare = 2;
item.useSound = 20;
item.autoReuse = true;
item.shoot = mod.ProjectileType("AmethystBolt");
item.shootSpeed = 16f;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, "Obsidian", 10);
recipe.AddIngredient(ItemID, "Amethyst", 10);
recipe.AddTile(ItemID, "Workbenches");
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
im getting an error about ItemID

using Terraria;
using Terraria.ModLoader;

If you are using Visual Studio, which you should be, then hover your mouse over the red underlined problem and it will give you options on how to fix it. In this case, ItemID isn't defined anywhere in your code, so you have to include the reference to the code that has ItemID, which would mean adding 'using Terraria.ID;' to the top of the file.
 
can you see a problem tho?

using Terraria;
using Terraria.ModLoader;

namespace GamingsMod.Items.Weapons
{
public class DeathBringer : ModItem
{
public override void SetDefaults()
{
item.name = "Death Bringer";
item.damage = 40;
item.magic = true;
item.mana = 4;
item.width = 40;
item.height = 40;
item.toolTip = "Some say only few can use the staff without dying.";
item.useTime = 25;
item.useAnimation = 25;
item.useStyle = 5;
Item.staff[item.type] = true;
item.noMelee = true;
item.knockBack = 5;
item.value = 10000;
item.rare = 2;
item.useSound = 20;
item.autoReuse = true;
item.shoot = mod.ProjectileType("AmethystBolt");
item.shootSpeed = 16f;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID, "Obsidian", 10);
recipe.AddIngredient(ItemID, "Amethyst", 10);
recipe.AddTile(ItemID, "Workbenches");
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
wait, i know where i fd up
[doublepost=1470899722,1470899501][/doublepost]wait i fixed something but im still getting the stupid item id thing even though nothings says item id in the entire cs
[doublepost=1470900006][/doublepost]
wait, i know where i fd up
[doublepost=1470899722,1470899501][/doublepost]wait i fixed something but im still getting the stupid item id thing even though nothings says item id in the entire cs
Modding is funky bull shrimp
 
c:\Users\Nope\Documents\My Games\Terraria\ModLoader\Mod Sources\GamingsMod\Items\DeathBringer.cs(34,25) : error CS0103: The name 'ItemID' does not exist in the current context

using Terraria;
using Terraria.ModLoader;

namespace GamingsMod.Items.Weapons
{
public class DeathBringer : ModItem
{
public override void SetDefaults()
{
item.name = "Death Bringer";
item.damage = 40;
item.magic = true;
item.mana = 4;
item.width = 40;
item.height = 40;
item.toolTip = "Some say only few can use the staff without dying.";
item.useTime = 25;
item.useAnimation = 25;
item.useStyle = 5;
Item.staff[item.type] = true;
item.noMelee = true;
item.knockBack = 5;
item.value = 10000;
item.rare = 2;
item.useSound = 20;
item.autoReuse = true;
item.shoot = mod.ProjectileType("AmethystBolt");
item.shootSpeed = 16f;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Obsidian, 10);

recipe.AddTile(TileID, "Workbenches");
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
im very confused cause im half asleep man, I STAYED UP TILL 5 LEARNING THIS! sos
[doublepost=1470902124,1470901724][/doublepost]currently i have no clue what your saying and im not going to use visual studio. I must learn to do this
 
OH THAT! IM SO FING DUMB
[doublepost=1470902686,1470902487][/doublepost]c:\Users\NO\Documents\My Games\Terraria\ModLoader\Mod Sources\GamingsMod\Items\DeathBringer.cs(35,25) : error CS0118: 'Terraria.ID.ItemID' is a 'type' but is used like a 'variable'
 
OH THAT! IM SO FING DUMB
[doublepost=1470902686,1470902487][/doublepost]c:\Users\NO\Documents\My Games\Terraria\ModLoader\Mod Sources\GamingsMod\Items\DeathBringer.cs(35,25) : error CS0118: 'Terraria.ID.ItemID' is a 'type' but is used like a 'variable'

recipe.AddIngredient(ItemID.Obsidian, 10);

recipe.AddTile(TileID, "Workbenches");
You see the problem here?
 
Back
Top Bottom