tModLoader Need help with CS0246

Pika

Official Terrarian
Im really new to the whole thing so i dont know what to do, pls help

My Error:
c:\Users\Roma\Documents\My Games\Terraria\ModLoader\Mod Sources\ProphecyOfNalulik\Items\NPCs\Boss\HungryEye.cs(3,7) : error CS0246: The type or namespace name 'Terarria' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\Roma\Documents\My Games\Terraria\ModLoader\Mod Sources\ProphecyOfNalulik\Items\NPCs\Boss\HungryEye.cs(4,7) : error CS0246: The type or namespace name 'Terarria' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\Roma\Documents\My Games\Terraria\ModLoader\Mod Sources\ProphecyOfNalulik\Items\NPCs\Boss\HungryEye.cs(9,30) : error CS0246: The type or namespace name 'ModNPC' could not be found (are you missing a using directive or an assembly reference?)

Code:
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terarria.ID;
using Terarria.ModLoader;
using Terraria;

namespace HungryEye.Items.NPCs.Boss
{
public class HungryEye : ModNPC
{
public override void SetDefaults()
{
npc.name = "Hungry Eye";
npc.displayName = "Hungry Eye";
npc.aiStyle = 5; //5 is the flying AI
npc.lifeMax = 3000;
npc.damage = 30;
npc.defense = 15;
npc.knokBackResist = 0f;
npc.width = 100;
npc.height = 100;
animationType = NPCID.DemonEye;
Main.npcFrameCount[npc.type] = 2;
npc.value = Item.buyPrice(0, 10, 0, 0);
npc.npcSlots = 1f;
npc.boss = true;
npc.lavaImmune = true;
npc.noGravity = true;
npc.noTileCollide = true;
npc.soundHit = 8;
npc.soundKilled = 14;
npc.buffImmune[24] = true;
music = MusicID.Boss2;
npc.netAlways = true;
}
public override void AutoloadHead(ref string headTexture, ref string bossHeadTexture)
{
bossHeadTexture = "ProphecyOfNalulik/Items/NPCs/Boss/HungryEye_Head_Boss";
}
public override void BossLoot(ref string name, ref int potionType)
{
potionType = ItemID.LesserHealingPotion;
Items.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("SwordOfRoma"));
}
public override void ScaleExpertStarts(int numPlayers, float bossLifeScale)
{
npc.lifeMax = (int)(npc.lifeMax * 1.5f * bossLifeScale);
npc.damage = (int)(npc.damage * 1.5f);
}
}

}
 
Last edited:
Pretty straightforward error. You wrote "Terarria" twice while it should be "Terraria". That should also fix the final error you're having.
(also: Use the bbcode code tag for writing code down on this thread)
 
Back
Top Bottom