1. So since that the old stacksize doesn't work on the itemv2 I thought I'm going to update the stacksize plugin,
    But I'm getting a little problem with it and I'm stuck on this part,
    PS I've let the actual owner from the plugin the same as it now is,
    I thought I'm going to help around because the oxide team have it busy enough

    Code:
            //void onserverinitialzed{) => loaded ():
            void loaded()
            {
           
                 loaddefaulftconfig ();
               
                gim.getitem{1).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{1) as iitem, {int)config["succulent"], null);
                gim.getitem{2).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{2) as iitem, {int)config["scopeminor"], null);
                gim.getitem{3).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{3) as iitem, {int)config["insulatedgloves"], null);
                gim.getitem{4).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{4) as iitem, {int)config["quashsilencer"], null);
               
            }
            protected override void loaddefaultconfig{)
            {
                if{config["succulent"] = null) config.set("succulent", 5);
                if{config["scopeminor"] = null) config.set("scopeminor", 5):
                if{config["insulatedgloves"] = null) config.set("insulatedgloves", 5):
                if{config["quashsilencer"] = null) config.set{"quashsilencer", 5);
                saveconfig();
           
            }
        }
    }
     
  2. Wulf

    Wulf Community Admin

    To start with, the hook names are case-sensitive, so making them all lowercase will cause issues and they won't be called. Without seeing the full error though, hard to really say what your issues is with it, but I'm guessing it has to do with your changes. ;)
     
  3. This is what I've used to make it work it kinda works but as you may see on the and with the void stuff it won't work no matter what I'm doing
    Code:
    // Reference: UnityEngine.UI
    using oxide.core;
    using system;
    using system.collection.generic;
    using system.reflection;
    using assets.scripts.core;namespace oxide.plugins
    {    [info"stacksize", "Noviets", "1.2.2,", resourceid = 1666)]
        [description("Stacksize)]
        
        class stacksize : hurtworldplugin
        {
        
            //void onserverinitialzed{) => loaded ():
            void loaded()
            {
            
                 loaddefaulftconfig ();
                
                gim.getitem{1).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{1) as iitem, {int)config["succulent"], null);
                gim.getitem{2).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{2) as iitem, {int)config["scopeminor"], null);
                gim.getitem{3).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{3) as iitem, {int)config["insulatedgloves"], null);
                gim.getitem{4).gettype{).basetype.getproperty{"maxstackisze").setvalue{gim.getitem{4) as iitem, {int)config["quashsilencer"], null);
                
            }
            protected override void loaddefaultconfig{)
            {
                if{config["succulent"] = null) config.set("succulent", 5);
                if{config["scopeminor"] = null) config.set("scopeminor", 5):
                if{config["insulatedgloves"] = null) config.set("insulatedgloves", 5):
                if{config["quashsilencer"] = null) config.set{"quashsilencer", 5);
                saveconfig();
            
            }
        }
    }
     
  4. Wulf

    Wulf Community Admin

    None of that will work as long as you keep lowercasing it all. Essentially your entire code there is wrong.
     
  5. Then where can I get the currently code to make this work ?
     
  6. Wulf

    Wulf Community Admin

    You can get the code from the existing plugin, just don't convert everything to lowercase. :p
     
  7. okey this time I've done the same way as the existing plugin but when close the whole thing plus the placing the override,
    I'm getting this error not sure what I suppose to with this its saying this,
    Code:
    Error while compiling: Stacksize.cs(31,27): error CS0115: `Oxide.Plugins.Stacksize.LoadDefaultConfig()' is marked as an override but no suitable method found to override
    but I got it on this way
    Code:
    // Reference: UnityEngine.UI
    using Oxide.Core;
    using System;
    using System.Colletction.Generic;
    using System. Reflection;
    using Assest.Scripts.Core;namespace Oxide.Plugins
    {
        [Info("Stacksize", "Noviets", "1.2.2", RescourceId = 1666)]
        [Description("Stacksize")]
        
        class Stacksize : HurtWorldPlugin
        {
            //void OnServerInitialized() => Loaded();
            void Loaded()
            {
                LoadDefaultConfig();
                
                GlobalItemManager GIM = Singleton<GlobalItemManager>.Instance;
                
                GIM.GetItem(1).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(1) as IItem, (int)Config["Succulent"], null);
                GIM.GetItem(2).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(2) as IItem, (int)Config["ScopeMinor"], null);
                GIM.GetItem(3).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(3) as IItem, (int)Config["InsulatedGloves"], null);
                GIM.GetItem(4).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(4) as IItem, (int)Config["QuashSilencer"], null);
            
            }
            protected override void LoadDefaultConfig()
            {
                if(Config["Succulent"] == null); Config.Set("Succulent", 1);
                if(Config["ScopeMinor"] == null) Config.Set("ScopeMinor", 1);
                if(Config["InsulatedGloves"] == null) Config.Set("InsulatedGlove", 1);
                if(Config["QuashSilencer"] == null) Config.Set("QuashSilencer", 1);
                SaveConfig();
                
            }
        }
    }    
     
  8. Wulf

    Wulf Community Admin

    There is no HurtWorldPlugin, it's HurtworldPlugin.
     
  9. Okey all of this is running and is stacking as 255
    Code:
    // Reference: UnityEngine.UI
    using Oxide.Core;
    using System;
    using System.Collections.Generic;
    using System. Reflection;
    using Assets.Scripts.Core;namespace Oxide.Plugins
    {
        [Info("Stacksize", "Noviets", "1.2.2", ResourceId = 1666)]
        [Description("Stacksize")]
        
        class Stacksize : HurtworldPlugin
        {
            //void OnServerInitialized() => Loaded();
            void Loaded()
            {
                LoadDefaultConfig();
                
                GlobalItemManager GIM = Singleton<GlobalItemManager>.Instance;
                
                GIM.GetItem(1).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(1) as IItem, (int)Config["Succulent"], null);
                GIM.GetItem(2).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(2) as IItem, (int)Config["ScopeMinor"], null);
                GIM.GetItem(3).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(3) as IItem, (int)Config["InsulatedGloves"], null);
                GIM.GetItem(4).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(4) as IItem, (int)Config["QuashSilencer"], null);
            
            }
            protected override void LoadDefaultConfig()
            {
                if(Config["QuashSilencer"] == null) Config.Set("QuashSilencer", 1);
                if(Config["Succulent"] == null) Config.Set("Succulent", 1);
                if(Config["ScopeMinor"] == null) Config.Set("ScopeMinor", 1);
                if(Config["InsulatedGloves"] == null) Config.Set("InsulatedGloves",1);
                SaveConfig();
                
            }
        }
    }
    but its saying this,
    Code:
    Failed to initialize plugin 'Stacksize v1.2.2' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.Stacksize.Loaded () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Stacksize.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0 
    And then a few minuts later I'm getting this
    ItemId 3 generatorNull: null Container: Null Stacksize 1
    ArgumentNullExeption: Argument Cannot be null,
    same on id 2 and 1
    which is weird because I'm able to set the sacksize as 255 and I can give it to my self
     
  10. Wulf

    Wulf Community Admin

    The null is something in the Loaded hook, which you should be doing all of that stuff in OnServerInitialized when the game stuff is fully available.
     
  11. Okey well I'm getting it so for but while I wanted to test some of this stuff,
    I'm getting this error,
    Code:
    Error while compiling: Stacksize.cs(43,51): error CS1525: Unexpected symbol `)', expecting `,' or `]'
    
    And I got this,
    Code:
    // Reference: UnityEngine.UI
    using Oxide.Core;
    using System;
    using System.Collection.Generic;
    using System.Reflection;
    using assets.Scripts.Core;namespace Oxide.Plugins
    {
        [Info("Stacksize", "Noviets", "1.2.2", ResourceId = 1666)]
        [Description("Stacksize")]
        
        class Stacksize : HurtworldPlugin
        {
            //void OnServerInitialized() => Loaded();
            void Loaded()
            {
                LoadDefaultConfig();
                
                GIM.GetItem(1).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(1) as IItem, (int)Config["Seeds"], null);
                GIM.GetItem(2).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(2) as IItem, (int)Config["ScopeMinor"], null);
                GIM.GetItem(3).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(3) as IItem, (int)Config["InsulatedGloves"], null);
                GIM.GetItem(4).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(4) as IItem, (int)Config["QuashSilencer"], null);
                GIM.GetItem(6).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(6) as IItem, (int)Config["FingerlessGloves"], null);
                GIM.GetItem(7).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(7) as IItem, (int)Config["ChaserRoof"], null);
                GIM.GetItem(8).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(8) as IItem, (int)Config["TripleDoorRight"], null);
                GIM.GetItem(9).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(9) as IItem, (int)Config["Wheels"], null);
                GIM.GetItem(10).GetType().BaseType.GetProperty("MaxStackSize").SetValue(GIM.GetItem(10) as IItem, (int)Config["Spear"], null);
            }
            protected override void LoadDefaultConfig()
            {
                if(Config["Seeds"] = null) Config.Set["Seeds", 1);
                if(Config["ScopeMinor"] = null) Config.Set["ScopeMinor", 1);
                if(Config["InsulatedGloves"] = null) Config.Set["InsulatedGloves", 1);
                if(Config["QuashSilencer"] = null) Config.Set["QuashSilencer", 1);
                if(Config["FingerlessGloves"] = null) Config.Set["FingerlessGloves", 1);
                if(Config["ChaserRoof"] = null) Config.Set["ChaserRoof", 1);
                if(Config["TripleDoorRight"] = null) Config.Set["TripleDoorRight", 1);
                if(Config["Wheels"] = null) Config.Set["Wheels", 1);
                if(Config["Spear"] = null) Config.Set["Spear", 1);
                SaveConfig();
            }
        }
    }
    So on my knowing for C++ scripting, everything is standing correctly,
    But I guess I'm just missing something that I'm overlooking at something,
     
  12. Wulf

    Wulf Community Admin

    On around line 43, you should find your issue, but you'll find the same error around 9 more times above that too. C# by the way, not C++. ;)
     
  13. I really can't find the issue around the line 43,
    So maybe you can tell me what I just miss here but I really can't find it
     
  14. Send me pm I can give you stacksizes for Itemv2
     
  15. Wulf

    Wulf Community Admin

    Likely:

    if(Config["Seeds"] = null) Config.Set(["Seeds"], 1);

    Not:

    if(Config["Seeds"] = null) Config.Set["Seeds", 1);
     
  16. afhter changing that I'm getting this,
    Code:
    Error while compiling: Stacksize.cs(7,14): error CS0234: The type or namespace name `Collection' does not exist in the namespace `System'. Are you missing an assembly reference?
     
  17. So your plugin is only config file as I see you posted above? There's much simplier way of doing this, I already told you send me pm
     
  18. Sorry but I'm not gonna use any third parts of plugins from someone else,
    I wanted to do this because I like to help the oxide team where it can not like other people that is thinking for them selfs
    [DOUBLEPOST=1527808586][/DOUBLEPOST]@Wulf
    its working right now I've add
    using Unityengine;
    using UnityEngine.UI;

    It is loading and working but I'm getting those error's
    Code:
    Failed to initialize plugin 'Stacksize v1.2.2' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.Stacksize.Loaded () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Stacksize.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0 
    So am i missing something on the plugin or is oxide something missing ?
     
  19. I'm just telling you its easier making new one instead updating this one, maybe its just for me and Wulf will help you. If you are trying to help you must bring solutions and less questions/problems.
     
  20. @Wulf I've fixed it so for only what I needed to do what adding this part public void Loaded()

    this just sloved the whole error thing