Hello.
=>Code:[HookMethod("OnPlayerLand")] object OnPlayerLand(BasePlayer player, float num) { return false; }
/*
* -/-/- kicked: RPC Error in OnPlayerLanded
* ArgumentOutOfRangeException: Argument is out of range.
* Parameter name: index
* return false;
*/
Kicked for RPC error in OnPlayerLanded
Discussion in 'Rust Development' started by Sanlerus, Apr 6, 2017.
-
Wulf Community Admin
Firstly, remove the [HookMethod] attribute you are using, that is not necessary. As far as the hooks go, both looks like fine and are correctly positioned and calling valid arguments, so it's unlikely to be the hook itself causing it.
Keep in mind that OnPlayerLand and OnPlayerLanded are different hooks, one is pre and one is post. -
-
http://i.imgur.com/RrRmYQb.png
I found what the problem, this error appears when used Unsubscribe(nameof(OnPlayerLand)); & return false;Last edited by a moderator: Apr 6, 2017 -
The error above occurs because of this line
When "OnPlayerLand" is called, I use "Unsubscribe (nameof (OnPlayerLand));" Because of what the "pluginList" list changes and when the code is executed below the error occurs.
-
-
-
Wulf Community Admin
-
-
Wulf Community Admin
-
Code:Interface.Oxide.NextTick(()=>Unsubscribe(nameof(OnPlayerLand)));
-
-
Why timers?
NextTick is event!