AJSurfer
Terrarian
This might also be an issue with my file pathing, but it might not, so im just checking the code too
I get these errors
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,16): error CS1001: Identifier expected
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,16): error CS1514: { expected
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,16): error CS1513: } expected
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,23): warning CS0414: The field 'KatanaZeroGenerals.ASSET_PATH' is assigned but its value is never used
I get these errors
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,16): error CS1001: Identifier expected
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,16): error CS1514: { expected
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,16): error CS1513: } expected
C:\Users\AJ\OneDrive\Documents\My Games\Terraria\tModLoader-preview\..\tModLoader\ModSources\KatanaZeroGenerals\KatanaZeroGenerals.cs(7,23): warning CS0414: The field 'KatanaZeroGenerals.ASSET_PATH' is assigned but its value is never used
C#:
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.GameContent.Creative;
namespace KatanaZeroGenerals.Content.Items.Weapons
{
internal class Zero_s_Katana : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Zero's Katana");
Tooltip.SetDefault("Zero's Katana\nHow did you get your hands on this?");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 20;
Item.useAnimation = 20;
Item.autoReuse = true;
Item.DamageType = DamageClass.Melee;
Item.damage = 20;
Item.knockBack = 3.5f;
Item.crit = 50;
Item.value = Item.buyPrice(silver: 80, copper: 50);
Item.rare = ItemRarityID.Blue;
Item.UseSound = SoundID.Item1;
}
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<Zero_s_Katana>(), 8)
.AddTile(TileID.Anvils)
.Register();
}
}
}
// Alright thats one piece of code there, heres another
using Terraria;
using Terraria.ModLoader;
using Terraria.GameContent.Creative;
namespace KatanaZeroGenerals.Content.Items
{
internal class Zero_s_Katana : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Zero's Katana");
Tooltip.SetDefault("Zero's Katana\nHow did you get your hands on this thing?");
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 100;
}
public override void SetDefaults()
{
Item.width = 16;
Item.height = 16;
Item.value = Item.buyPrice(copper: 5);
Item.maxStack = 1;
}
}
}
// And another
using Terraria.ModLoader;
namespace KatanaZeroGenerals
{
public class KatanaZeroGenerals : Mod
{
public class string ASSET_PATH = "KatanaZero/Assets/";
}
}
Last edited: