Somebody please help me!

1693836818748.png

This is the worst error that I have ever got. What is this? Why is it showing that this problem is located to a file that I dont know? The last thing I did was edit my mod.


namespace Ahemaho.NPCs
{
class Hellslime : ModNPC
{
public override string Texture => "Terraria/Images/NPC_59" + NPCID.LavaSlime;


public override void SetDefaults()
{
NPC.CloneDefaults(NPCID.LavaSlime);
AIType = NPCID.LavaSlime;
AnimationType = NPCID.LavaSlime;
}

public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
{
// Here we can make things happen if this NPC hits a player via its hitbox (not projectiles it shoots, this is handled in the projectile code usually)
// Common use is applying buffs/debuffs:

int buffType = BuffID.Slow;
// Alternatively, you can use a vanilla buff: int buffType = BuffID.Slow;

int timeToAdd = 1 * 60; //This makes it 5 seconds, one second is 60 ticks
target.AddBuff(buffType, timeToAdd);
}

}
}
 
C#:
public override string Texture => "Terraria/Images/NPC_59" + NPCID.LavaSlime;
This evaluates to "Terraria/Images/NPC_5959". Either get rid of the "59" in the string, or stop appending NPCID.LavaSlime.
I'm not sure why your error message refers to "NPC_59" unless you changed something between getting the error message and posting about it.
 
C#:
public override string Texture => "Terraria/Images/NPC_59" + NPCID.LavaSlime;
This evaluates to "Terraria/Images/NPC_5959". Either get rid of the "59" in the string, or stop appending NPCID.LavaSlime.
I'm not sure why your error message refers to "NPC_59" unless you changed something between getting the error message and posting about it.
Thanks, I already took care of this error.
 
Back
Top Bottom