tModLoader Getting error.

I'm getting a similar error when trying to load the mod browser

Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Terraria.ModLoader.UI.UIModBrowser.PopulateFromJSON(TmodFile[] installedMods, String json)

i have tried looking around the internet but no one else seems to have this error, can anyone help me fix it?
 
I fixed that but now im getting error cso116 code:


DisplayName.SetDefault("Sword Of Power");
Tooltip.SetDefault("This is a modded sword.");
(public override void SetDefaults)
item.damage = 198;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = 10000;
item.rare = 4;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
(public override void AddRecipes)
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Broken Hero Sword, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
(recipe.AddRecipe);
item.shoot = 302; item.shootspeed = 12f
 
I am making a mod but i keep getting this error pls help
 

Attachments

  • Screen Shot 2019-06-04 at 6.17.45 pm.png
    Screen Shot 2019-06-04 at 6.17.45 pm.png
    348.7 KB · Views: 160
I fixed that but now im getting error cso116 code:


DisplayName.SetDefault("Sword Of Power");
Tooltip.SetDefault("This is a modded sword.");
(public override void SetDefaults)
item.damage = 198;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = 10000;
item.rare = 4;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
(public override void AddRecipes)
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Broken Hero Sword, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
(recipe.AddRecipe);
item.shoot = 302; item.shootspeed = 12f
Do you actually have a semicolon ";" after "item.shootspeed = 12f" If you don't, add it. Look at this link: Error CSO116: A namespace can only contain types and namespace declarations - Unity Answers. Though this is an example in unity with c#. Error CSO116: A namespace can only contain types and namespace declarations. Check your namespace.
 
I'm making a mod, today i was making a new item, and then i clicked in build and reload, and this happens (dont know if my tmodloader is outdatted) sorry for a mistake in my english if it has.
Dont' know how to solve this, please help.

System.IO.FileNotFoundException: Could not find file 'C:\Program Files (x86)\Steam\steamapps\common\Terraria\ModCompile\tModLoader.XNA.exe'.
File name: 'C:\Program Files (x86)\Steam\steamapps\common\Terraria\ModCompile\tModLoader.XNA.exe'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Terraria.ModLoader.Core.ModCompile.GetTerrariaReferences(String tempDir, Boolean xna)
at Terraria.ModLoader.Core.ModCompile.CompileMod(BuildingMod mod, String outputPath, List`1& refMods, Boolean xna)
at Terraria.ModLoader.Core.ModCompile.BuildModForPlatform(BuildingMod mod, List`1& refMods, Boolean xna)
at Terraria.ModLoader.Core.ModCompile.Build(BuildingMod mod)
at Terraria.ModLoader.Core.ModCompile.Build(String modFolder)
at Terraria.ModLoader.UI.UIBuildMod.<>c__DisplayClass5_0.<Build>b__0(ModCompile mc)
at Terraria.ModLoader.UI.UIBuildMod.BuildMod(Action`1 buildAction, Boolean reload)
 
Back
Top Bottom