Universal command

i dont know why but i get this error when i have the Universal cmd on

Failed to call hook 'CmdUniversal' on plugin 'VehicleLicence v1.7.48' (ArgumentNullException: Value cannot be null.
Parameter name: key)
at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <2161c9885dd04ff291b79db9349c4b9b>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <2161c9885dd04ff291b79db9349c4b9b>:0
at Oxide.Plugins.VehicleLicence.GetBaseVehicleSettings (System.String vehicleType) [0x00000] in <dc11acaca14041baa2aec4f02b7cf4d0>:0
at Oxide.Plugins.VehicleLicence.CanSpawn (BasePlayer player, Oxide.Plugins.VehicleLicence+Vehicle vehicle, System.Boolean bypassCooldown, System.String command, System.String& reason, UnityEngine.Vector3& position, UnityEngine.Quaternion& rotation) [0x00007] in <dc11acaca14041baa2aec4f02b7cf4d0>:0
at Oxide.Plugins.VehicleLicence.HandleUniversalCmd (BasePlayer player, System.String vehicleType, System.Boolean bypassCooldown, System.String command) [0x0005b] in <dc11acaca14041baa2aec4f02b7cf4d0>:0
at Oxide.Plugins.VehicleLicence.CmdUniversal (BasePlayer player, System.String command, System.String[] args) [0x00053] in <dc11acaca14041baa2aec4f02b7cf4d0>:0
at Oxide.Plugins.VehicleLicence.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0135e] in <dc11acaca14041baa2aec4f02b7cf4d0>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <e3740cd7ab6f40909737d74eeeaf1a8a>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <032ab7611607468ebf42c14e3cf9df20>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <032ab7611607468ebf42c14e3cf9df20>:0

 

hmm interesting, is this common or rare to occur?

atm common it happend after the last update 

Merged post

also after a reboot i get the message that you have to wait before spawning in error 

i never had that before

private void HandleUniversalCmd(BasePlayer player, string vehicleType, bool bypassCooldown, string command)
{
 if (!finishedLoading)
 {
 Print(player, Lang("PleaseWait", player.UserIDString));
 return;
 }

this section 

Hmm, okay then I will look into it when I can and try to recreate it, thanks for reporting it!

And yes, that please wait is a (somewhat) new feature, has been in ever since I took over maintaining the plugin, its due to me changing how the loading of all vehicles work when you first put in the plugin. It now is a coroutine instead of a foreach/for loop, was intended to prevent any performance issues, and the please wait was added to prevent errors when loading as a command used during that load up period would error without that check and please wait.

Though this should have no effect on the plugin other than that. Looking at the stack trace (or whatever its called) it seems to be during the CanSpawn method, calling the GetBaseVehicleSettings, and somehow a value is null, though not sure how that'd exactly happen lol

Do you happen to know if its certain vehicles this happens to or just randomly on any vehicle?

yes on all but atm mostly on mini and attack 

if i stop that command thing then no errors tho 

Hmm weird, and seemingly you've already tried restarting/reloading plugin based on your previous messages. I can try looking into it tonight, do you mind messaging me your config? Can send me it on discord as well if thats easier, am Bug Man in Oxide discord.