i also keep on getting this error also idk why
if your asking heres the code
using System;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.DataStructures;
namespace armorswords.Projectiles
{
public class MourningArc : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Mourning Arc"); //The weapon's name when shown in-game.
}
public override void SetDefaults()
{
projectile.width = 120;
projectile.height = 120;
projectile.timeLeft = 15;
projectile.penetrate = -1;
projectile.scale = 0.6f;
projectile.ignoreWater = true;
projectile.melee = true;
projectile.friendly = true;
projectile.tileCollide = false;
}
public override void AI()
{
//The sound code for the projectile.
projectile.soundDelay--;
if (projectile.soundDelay <= 0)
{
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 15);
projectile.soundDelay = 45;
}
//How the projectile works.
Player player = Main.player[projectile.owner];
if (Main.myPlayer == projectile.owner)
{
if (!player.channel || player.noItems || player.CCed)
{
projectile.Kill();
}
}
Lighting.AddLight(projectile.Center, 0f, 1f, 0f); //This is the Projectile's light color (RGB)
projectile.Center = player.MountedCenter;
projectile.position.X += player.width / 2 * player.direction;
projectile.spriteDirection = player.direction;
projectile.rotation += 0.36f * player.direction; //This is the Projectile's Spinning/Rotation Speed
if (projectile.rotation > MathHelper.TwoPi)
{
projectile.rotation -= MathHelper.TwoPi;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D texture = Main.projectileTexture[projectile.type];
spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, new Vector2(texture.Width / 2, texture.Height / 2), 1f, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f);
return false;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 5 * 60); //Add CursedInferno Buff to the NPC for 5 seconds.
target.immune[projectile.owner] = 2;
}
}
}