juhnyoplays
Golem
I had the error CS0116: A namespace cannot directly contain members such as fields or methods.
Please post your entire code.I had the error CS0116: A namespace cannot directly contain members such as fields or methods.
I gave up by now... and I deleted everything in Mod Sources...Please post your entire code.
using Terraria.ModLoader;
using Terraria.ID;
namespace TheGermaniumMod
{
class TheGermaniumMod : Mod
{
public TheGermaniumMod()
{
Properties = new ModProperties()
{
Autoload = true,
AutoloadGores = true,
AutoloadSounds = true
public override void AddRecipes()
{
{
ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.LivingFireBlock, 20);
recipe.AddIngredient(ItemID.Fireblossom, 5);
recipe.AddIngredient(this.GetItem(FieryTotem, 4));
recipe.AddTile(TileID.Hellforge);
recipe.SetResult(ItemID.FieryLava - Blade);
recipe.AddRecipe();
}
}
}
};
Open it up on notepad because notepad++ and other text editors will read it differently. After that, just use the enter key after the end of each keyword, those being author, displayname, and versionAlright. I LITERALLY copied the build text (I mean I replaced the author and mod name) and it says
displayname is blank!
author is blank!
please update the build.txt
Please help
Error messages are good, but what's better is an error message and the code!little help pls (my game is in french)View attachment 173682
Also the error could be that you don't have a matching "{" for a "}"little help pls (my game is in french)View attachment 173682
ok there is the codeError messages are good, but what's better is an error message and the code!
[doublepost=1497733934,1497733853][/doublepost]
Also the error could be that you don't have a matching "{" for a "}"
Namespace is incorrect, can you show me your folder structure? I'm guessing that your mod name is "Darkcraftmod", if that is the folder name, then it should just beok there is the code
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Mod Sources.Darkcraftmod.Items
{
public class Sword : ModItem
{
public override void SetDefaults()
{
item.name = "Darkcraft sword";
item.damage = 50;
item.melee = true;
item.width = 60;
item.height = 60;
item.toolTip = "This is Darkcraft sword.";
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = Item.buyPrice(0, 10, 0, 0);
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Darkcraftmod.Items
thank ta fixed my first itemNamespace is incorrect, can you show me your folder structure? I'm guessing that your mod name is "Darkcraftmod", if that is the folder name, then it should just be
Code:Darkcraftmod.Items
Since the "Mod Sources" is the place it compiles things at anyways.
I am guessing this is for the new tModLodaer .10, so here is the migration guide to help you. https://docs.google.com/document/d/1GY6Jyj0IkqfvQlXJUwXg60d2V8tIzumoNVgh5OWzGIc/editthank ta fixed my first item
[doublepost=1497806099,1497805689][/doublepost]another bug:
c:\Users\Marie\Documents\My Games\Terraria\ModLoader\Mod Sources\DarkcraftMeleemod\Items\Darkcraftsword.cs(11,18) : error CS1061: 'Terraria.Item' ne contient pas une définition pour 'name' et aucune méthode d'extension 'name' acceptant un premier argument de type 'Terraria.Item' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?)
c:\Users\Marie\Documents\My Games\Terraria\ModLoader\Mod Sources\DarkcraftMeleemod\Items\Darkcraftsword.cs(16,18) : error CS1061: 'Terraria.Item' ne contient pas une définition pour 'toolTip' et aucune méthode d'extension 'toolTip' acceptant un premier argument de type 'Terraria.Item' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?)
the new code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Darkcraftmod.Items
{
public class Darkcraftmod : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Darkcraft sword");
Tooltip.SetDefault("This is Darkcraft sword.");
}
public override void SetDefaults()
{
item.damage = 50;
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 = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Like I have said for the above.Hi, i am not able to build my mod. Here are Screenshots. I used the "MyFirstMod" File.
my Build.txt:
author = Shasa2308
version = 0.1
displayName = ShasaMOD
homepage = http://forums.terraria.org/index.php?posts/998374
hideCode = false
hideResources = false
includeSource = true
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*
includePDB = true
I hope you can help me. Thanks (any German here how can help me? --> conversation)
View attachment 174579
View attachment 174580
I am guessing this is for the new tModLodaer .10, so here is the migration guide to help you. https://docs.google.com/document/d/1GY6Jyj0IkqfvQlXJUwXg60d2V8tIzumoNVgh5OWzGIc/edit
He hasn't updated this yet for the new tModLoader.
oh ok. thanksLike I have said for the above.