tModLoader can someone help me fix this error

EtoDan

Terrarian
whenever i try to build and reload i get this:

c:\Users\(name)\Documents\My Games\Terraria\ModLoader\Mod Sources\deltarune\Items\cake\RalseiCake.cs(1,31) : error CS0246: The type or namespace name 'ModItem' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\(name)\Documents\My Games\Terraria\ModLoader\Mod Sources\deltarune\Items\cake\RalseiCake.cs(11,82) : error CS0246: The type or namespace name 'EquipType' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\(name)\Documents\My Games\Terraria\ModLoader\Mod Sources\deltarune\Items\cake\RalseiCake.cs(11,76) : error CS0246: The type or namespace name 'IList' could not be found (are you missing a using directive or an assembly reference?)

and the code is:

public class RalseiCake : ModItem
{
public override void SetDefaults()
{
item.CloneDefaults(ItemID.SuperHealingPotion);
item.name = "Ralsei's cake";
item.tooltip = "";
item.healLife = Main.player[item.owner].statLifeMax2;
}

public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
texture = "cake.png" + ItemID.SuperHealingPotion;
return true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
 
Could have been great, if you would have been helping to fix the issue instead of just redirecting to the most awful "no search engine here" based websites of all world: Github.
The issue here is about your "item.owner", it is not supported anymore, as someone always thinks that renaming all bloody variables and parameters is just as fun as whatever. I hate it if people are switching stuff every bloody year in programming and expect people to catch up to these unnecessary edits. Microsoft does this all the way with each fooking year of C# and C++ interpretations, so why wasting time and not doing the same with my own library, amiright?

Just stop it already.
 
Back
Top Bottom