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(); } } }
Unexpected symbol `void', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
Discussion in 'Hurtworld Discussion' started by TruxDeadnitro, May 30, 2018.
-
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.
-
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(); } } }
-
Wulf Community Admin
-
-
Wulf Community Admin
-
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
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(); } } }
-
Wulf Community Admin
-
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(); } } }
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
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 -
Wulf Community Admin
-
I'm getting this error,
Code:Error while compiling: Stacksize.cs(43,51): error CS1525: Unexpected symbol `)', expecting `,' or `]'
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(); } } }
But I guess I'm just missing something that I'm overlooking at something, -
Wulf Community Admin
-
So maybe you can tell me what I just miss here but I really can't find it -
Send me pm I can give you stacksizes for Itemv2
-
Wulf Community Admin
if(Config["Seeds"] = null) Config.Set(["Seeds"], 1);
Not:
if(Config["Seeds"] = null) Config.Set["Seeds", 1); -
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?
-
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
-
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
-
-
@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