daily pastebin goal
14%
SHARE
TWEET

ERRORno.2

grimreper97 Jun 13th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Hello, sorry for bothering you again,  but there is another error...
  2.  
  3. c:\Users\chedl\Documents\My Games\Terraria\ModLoader\Mod sources\op weapons\Items\TrueHell.cs(34,13) : error CS0120: An object reference is required for the non-static field, method, or property 'Terraria.Item.maxStack'
  4.  
  5. c:\Users\chedl\Documents\My Games\Terraria\ModLoader\Mod sources\op weapons\Items\TrueHell.cs(36,18) : error CS0117: 'Terraria.Item' does not contain a definition for 'Width'
  6.  
  7. c:\Users\chedl\Documents\My Games\Terraria\ModLoader\Mod sources\op weapons\Items\TrueHell.cs(38,13) : error CS0120: An object reference is required for the non-static field, method, or property 'Terraria.Entity.height'
  8.  
  9. c:\Users\chedl\Documents\My Games\Terraria\ModLoader\Mod sources\op weapons\Items\TrueHell.cs(40,13) : error CS0120: An object reference is required for the non-static field, method, or property 'Terraria.Item.value'
  10.  
  11. c:\Users\chedl\Documents\My Games\Terraria\ModLoader\Mod sources\op weapons\Items\TrueHell.cs(42,13) : error CS0120: An object reference is required for the non-static field, method, or property 'Terraria.Item.rare'
  12.  
  13. also, here is the script:
  14.  
  15. using Microsoft.Xna.Framework;
  16.  
  17. using Terraria;
  18.  
  19. using Terraria.ID;
  20.  
  21. using Terraria.ModLoader;
  22.  
  23.  
  24.  
  25. namespace op_weapons.Items
  26.  
  27. {
  28.  
  29.     public class TrueHell : ModItem
  30.  
  31.     {
  32.  
  33.         public override void SetStaticDefaults()
  34.  
  35.         {
  36.  
  37.             DisplayName.SetDefault("Omega Eye");
  38.  
  39.             Tooltip.SetDefault("The legendary item");
  40.  
  41.         }
  42.  
  43.  
  44.         public override void SetDefaults()
  45.  
  46.         {
  47.  
  48.             Item.maxStack = 999;
  49.  
  50.             Item.Width = 40;
  51.  
  52.             Item.height = 40;
  53.  
  54.             Item.value = 1230000;
  55.  
  56.             Item.rare = 2;
  57.      
  58.  
  59.     }
  60.  
  61.  
  62.  
  63.         public override void AddRecipes()
  64.  
  65.         {
  66.  
  67.             ModRecipe recipe = new ModRecipe(mod);
  68.  
  69.             recipe.AddIngredient(ItemID.GrayBrick);
  70.  
  71.             recipe.SetResult(this, 2);
  72.  
  73.             recipe.AddRecipe();
  74.  
  75.         }
  76.  
  77.     }
  78.  
  79. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top