tModLoader The sequence does not contain any matching elements

Zeta_Undead

Terrarian
Error:
The sequence does not contain any matching elements
In System.Linq.Enumerable.Single [TSource] (IEnumerable`1 source, Func`2 predicate)
In Terraria.ModLoader.AssemblyManager.InstantiateMods (List`1 modsToLoad)

How is it solved? Does it have anything to do with the codes? By the way, I speak Spanish, and I would like them to speak to me in the most direct way possible.
Thank you, I await your answers. :happy:
 
You need a Mod class:
Code:
using Terraria.ModLoader;

namespace MyMod
{
    class MyMod : Mod
    {
        public MyMod()
        {
        }
    }
}
 
Is this code in a new file? Or an existing one?
[doublepost=1490914965,1490914534][/doublepost]Forget it, but now I get this error:

Items/PetCall
en Terraria.ModLoader.Mod.GetTexture(String name)
en Terraria.ModLoader.ModLoader.GetTexture(String name)
en Terraria.ModLoader.Mod.SetupContent()
en Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
Perhaps you have misspelled your texture file's name. It looks for the directory stated in namespace and then the class.

Here is an example:

namespace ExampleMod.Items
{
public class WaterBottle : ModItem
{
public override void SetDefaults()
{
}
}
}

Here it would look for the texture in ExampleMod/Items called WaterBottle
 
Everything is correct?

Using Terraria;
Using Terraria.ID;
Using Terraria.ModLoader;

Namespace YourModName.Items
{
Public class PetCall: ModItem
{
Public override void SetDefaults ()
{
Item.CloneDefaults (ItemID.ZephyrFish);
Item.name = "PetCall";
Item.toolTip = "Summons a Cool Pet to follow you";
Item.shoot = mod.ProjectileType ("PetName");
Item.buffType = mod.BuffType ("PetBuff");
}

Public override void AddRecipes ()
{
ModRecipe recipe = new ModRecipe (mod);
Recipe.AddIngredient (ItemID.DirtBlock, 1);
Recipe.AddTile (null, "WBName");
Recipe.SetResult (this);
Recipe.AddRecipe ();
}

Public override void UseStyle (Player player)
{
If (player.whoAmI == Main.myPlayer && player.itemTime == 0)
{
Player.AddBuff (item.buffType, 3600, true);
}
}
}
}

The image is called PetCall
 
You need to make sure the namespace and folder structure match. Look in my sig for the guide
 
Back
Top Bottom