plugin is borked (rm4)
Closed this issue · 10 comments
ndv400 commented
ndv400 commented
also there's no unload method which should be something like
protected override void Unload()
{
UnturnedPlayerEvents.OnPlayerDead -= UnturnedPlayerEventsOnOnPlayerDead;
Instance = null;
}
archie426 commented
I probably haven’t updated this to Nelson’s newer RM, will do soon
archie426 commented
Should be fixed
ndv400 commented
hmm, won't build, CS0507
archie426 commented
Ugh typical nelson changing shit, I forgot he hadn't only changed the name
archie426 commented
Fixed
ndv400 commented
forgot to add
you have to also do it like this
public override void UnloadPlugin(PluginState state = PluginState.Unloaded)
in every plugin of yours :)
ndv400 commented
also it now compiles but won't load without errors in logs
ndv400 commented
[24.05.2020 18:15:05] [Info] [World] [Гл. Модератор] JaCKi [⌦JΔ¢Ҝł™]: "/back"
[24.05.2020 18:15:05] [Error] Exception has been thrown by the target of an invocation.
[24.05.2020 18:15:05] [Error] at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <e1319b7195c343e79b385cd3aa43f5dc>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <e1319b7195c343e79b385cd3aa43f5dc>:0
at (wrapper dynamic-method) SDG.Unturned.SteamChannel.DMD<DMD<receive_Patch2>?1004926976::receive_Patch2>(SDG.Unturned.SteamChannel,Steamworks.CSteamID,byte[],int,int)
[24.05.2020 18:15:06] [Error] Value cannot be null.
Parameter name: collection
[24.05.2020 18:15:06] [Error] at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) [0x00006] in <e1319b7195c343e79b385cd3aa43f5dc>:0
at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x00003] in <e1319b7195c343e79b385cd3aa43f5dc>:0
at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <e1319b7195c343e79b385cd3aa43f5dc>:0
at Rocket.API.IRocketPermissionsProviderExtensions.HasPermission (Rocket.API.IRocketPermissionsProvider rocketPermissionProvider, Rocket.API.IRocketPlayer player, Rocket.API.IRocketCommand command) [0x0001a] in <1ef0125c67a64c40ad79bd6ae336260d>:0
at Rocket.Unturned.Permissions.UnturnedPermissions.CheckPermissions (SDG.Unturned.SteamPlayer caller, System.String permission) [0x00053] in <2389433b4de64d7a936bca792e48c781>:0
at Rocket.Unturned.U+<>c.<bindDelegates>b__16_3 (SDG.Unturned.SteamPlayer player, System.String text, System.Boolean& shouldExecuteCommand, System.Boolean& shouldList) [0x00022] in <2389433b4de64d7a936bca792e48c781>:0
at (wrapper delegate-invoke) <Module>.invoke_void_SteamPlayer_string_bool&_bool&(SDG.Unturned.SteamPlayer,string,bool&,bool&)
at SDG.Unturned.ChatManager.process (SDG.Unturned.SteamPlayer player, System.String cmd, System.Boolean fromUnityEvent) [0x0005f] in <552a1fa2dff648c2a994d098a8810480>:0
at SDG.Unturned.ChatManager.askChat (Steamworks.CSteamID steamID, System.Byte flags, System.String text) [0x001ed] in <552a1fa2dff648c2a994d098a8810480>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <e1319b7195c343e79b385cd3aa43f5dc>:0
if I do
protected override void Load()
protected override void Unload()
archie426 commented
LoadPlugin and UnloadPlugin, use an IDE