tModLoader error:cs1513 !help

combinealpha

Terrarian
well im starting modding terraria and i was doing a beretta92f (from s.t.a.l.k.e.r), and when i started terraria it gave me an error :c:\Users\Simon\Documents\my games\Terraria\ModLoader\Mod Sources\APT\Items\Weapons\Beretta92F.cs(42,10) : error CS1513: Se esperaba } (se esperaba = was expected)
im using Microsoft visual studio c#,heres the script:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace APT.Items.Weapons
{c
public class Beretta92F : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("++++++.");
}
public override void SetDefaults()
{
item.damage = 52;
item.ranged = true;
item.width = 42;
item.height = 30;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 5;
item.noMelee = true;
item.knockBack = 4;
item.value = 10000;
item.rare = 2;
item.UseSound = SoundID.Item11;
item.autoReuse = true;
item.shoot = 10;
item.shootSpeed = 16f;
item.useAmmo = AmmoID.Bullet;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IronBar, 22);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}

//i don´t know what happend but i think that i missed something in the recipe.
 
You seem to be missing a } at the end, and you have a random "c" after "namespace APT.Items.Weapons{"

oDfE6d6.png
 
Yeah, either it is like it says and you've clobbered some folders together or it's another error. I suggest just coming to the discord server: discord.me/tModLoader
 
I have the error as well, but it a gun.
Here's the code:

using Terraria.ID;
using Terraria.ModLoader;
namespace CallOfDutyMod.Items.Guns
{
public class M27 : ModItem
{
public override void SetDefaults()
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("M27")
Tooltip.SetDefault("M27 from COD BO2.")
}
{
item.damage = 50;
item.ranged = true;
item.width = 22;
item.height = 44;
item.useTime =30;
item.useAnimation = 20;
item.useStyle = 5;
item.noMelee = true;
item.knockBack = 0;
item.value = 10000;
item.rare = 13;
item.useSound = 11;
item.autoReuse = true;
item.shoot = 10;
item.shootSpeed =60f;
item.useAmmo = ProjectileID.Bullet;
}
public override void AddRecipes() //How to craft this gun
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IronBar, 20);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

Im wondering why i have the "} expected" thing... cause I have everything in the brackets!
[doublepost=1527718251,1527718160][/doublepost]
I have the error as well, but it a gun.
Here's the code:

using Terraria.ID;
using Terraria.ModLoader;
namespace CallOfDutyMod.Items.Guns
{
public class M27 : ModItem
{
public override void SetDefaults()
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("M27")
Tooltip.SetDefault("M27 from COD BO2.")
}
{
item.damage = 50;
item.ranged = true;
item.width = 22;
item.height = 44;
item.useTime =30;
item.useAnimation = 20;
item.useStyle = 5;
item.noMelee = true;
item.knockBack = 0;
item.value = 10000;
item.rare = 13;
item.useSound = 11;
item.autoReuse = true;
item.shoot = 10;
item.shootSpeed =60f;
item.useAmmo = ProjectileID.Bullet;
}
public override void AddRecipes() //How to craft this gun
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IronBar, 20);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

Im wondering why i have the "} expected" thing... cause I have everything in the brackets!
WAIT! I SEE IT
[doublepost=1527718303][/doublepost]
I have the error as well, but it a gun.
Here's the code:

using Terraria.ID;
using Terraria.ModLoader;
namespace CallOfDutyMod.Items.Guns
{
public class M27 : ModItem
{
public override void SetDefaults()
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("M27")
Tooltip.SetDefault("M27 from COD BO2.")
}
{
item.damage = 50;
item.ranged = true;
item.width = 22;
item.height = 44;
item.useTime =30;
item.useAnimation = 20;
item.useStyle = 5;
item.noMelee = true;
item.knockBack = 0;
item.value = 10000;
item.rare = 13;
item.useSound = 11;
item.autoReuse = true;
item.shoot = 10;
item.shootSpeed =60f;
item.useAmmo = ProjectileID.Bullet;
}
public override void AddRecipes() //How to craft this gun
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IronBar, 20);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

Im wondering why i have the "} expected" thing... cause I have everything in the brackets!
[doublepost=1527718251,1527718160][/doublepost]
WAIT! I SEE IT
Nope.. still there
 
Back
Top Bottom