InvalidCastException at AreFriendsError

This exception is caused by an incorrect Friends 2.2.5 function called by NTeleportation. In Friends, AreFriends() expects two ulong arguments, thus the invalid cast exception. The Friends function that accepts string arguments for user id's is AreFriendsS(). Note the trailing 'S' in the function name.

In NTeleportation.AreFriends, change:

return Friends.Call<bool>("AreFriends", playerId, targetId);


To this:

return Friends.Call<bool>("AreFriendsS", playerId, targetId);
5d826ae6d4a1a.png WhiteDragon

This exception is caused by an incorrect Friends function called by NTeleportation. In Friends, AreFriends() expects two ulong arguments, thus the invalid cast exception. The Friends function that accepts string arguments for user id's is AreFriendsS(). Note the trailing 'S' in the function name.

In NTeleportation.AreFriends, change:

return Friends.Call<bool>("AreFriends", playerId, targetId);

To this:

return Friends.Call<bool>("AreFriendsS", playerId, targetId);
That is not valid. AreFriendS is old and has not existed for nearly a year. What it is using now is valid. Friends has both a string and a ulong variant, which Oxide should handle automatically via hook overloading.
You are correct; I am using Friends 2.2.5. The fix is to update Friends to 3.1.1.