NullReferenceException at IsFriendFixed
[Error] Failed to call hook 'cmdChatHome' on plugin 'NTeleportation v1.0.73' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NTeleportation.IsFriend (System.UInt64 friendid, System.UInt64 playerid) [0x00118] in <7d814020735b4e64978ca7c01f9dc647>:0 
  at Oxide.Plugins.NTeleportation.CheckFoundation (System.UInt64 userID, UnityEngine.Vector3 position) [0x000aa] in <7d814020735b4e64978ca7c01f9dc647>:0 
  at Oxide.Plugins.NTeleportation.cmdChatHomeTP (BasePlayer player, System.String command, System.String[] args) [0x00157] in <7d814020735b4e64978ca7c01f9dc647>:0 
  at Oxide.Plugins.NTeleportation.cmdChatHome (BasePlayer player, System.String command, System.String[] args) [0x001f1] in <7d814020735b4e64978ca7c01f9dc647>:0 
  at Oxide.Plugins.NTeleportation.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x015e9] in <7d814020735b4e64978ca7c01f9dc647>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 

I have chaos Clans installed, and no Friends plugin. Not sure what is causing this, i have got this from console
upd: turned off clans (only teams are enabled), problem is still exists

I think I understand now why Clans support remained broken for so long.  There are way too many plugins using the same namespace - some use the same function calls as another but perhaps not all.  Since I do not have access to that plugin I can only say that this is not compatible.  You will probably need to set UseClans to false and/or reload NTeleportation.
5ba5bf1da6b60.jpg rfc1920
I think I understand now why Clans support remained broken for so long.  There are way too many plugins using the same namespace - some use the same function calls as another but perhaps not all.  Since I do not have access to that plugin I can only say that this is not compatible.  You will probably need to set UseClans to false and/or reload NTeleportation.

I think a few named themselves the same as the public Clans plugin in order to avoid plugins having to implement them all, but then some probably forked off while keeping the same filename and such, causing breakage. :/

Same exact issue. Clans and friends are turned off.
5ba5bf1da6b60.jpg rfc1920
I think I understand now why Clans support remained broken for so long.  There are way too many plugins using the same namespace - some use the same function calls as another but perhaps not all.  Since I do not have access to that plugin I can only say that this is not compatible.  You will probably need to set UseClans to false and/or reload NTeleportation.

Its already false, but still an issue, as i told in update.

Also chaos clans maintaining API the same as for ClansIO, so there shouldn't be any issues unless they do a mistake. The IO clans and universal version (both from umod) however has some differences.

Once you unload Clans or Friends, reload NTeleportation.  As far as the other Clan plugins, I have no way to verify how they work.

1.0.74 now checks for the loading and unloading of these plugins.
5ba5bf1da6b60.jpg rfc1920
Once you unload Clans or Friends, reload NTeleportation.  As far as the other Clan plugins, I have no way to verify how they work.

1.0.74 now checks for the loading and unloading of these plugins.

Calls to plugin references should return nulls if plugin is unloaded, am i not right? So, the checks which you just added (OnPluginLoaded and OnPluginUnloaded) aren't necessary.

The problem is with teams native feature, exception throws in this code:

            if(configData.Home.UseTeams)
            {
#if DEBUG
                Puts("Checking Rust teams...");
#endif
                BasePlayer player = BasePlayer.FindByID(playerid);
                if(player.currentTeam != (long)0)
                {
                    RelationshipManager.PlayerTeam playerTeam = RelationshipManager.Instance.FindTeam(player.currentTeam);
                    if(playerTeam == null) return false;
                    if(playerTeam.members.Contains(friendid))
                    {
#if DEBUG
                        Puts("  IsFriend: true based on Rust teams");
#endif
                        return true;
                    }
                }
            }

Player is null, because playerid is ID of a foundation owner, not player.

 

Cool.
5ba5bf1da6b60.jpg rfc1920
Cool.
Do you know, that BasePlayer.FindByID returns null for offline players?
creepy spam
"UseClans": false,

I do not use clans

Your most recent update didn't do anything. Still getting the error with Teams enabled, very annoyed... Players can't see their homes if I turn teams off. Next time you add a feature, test it before releasing.
i think this will help :

"UseFriends": false,
"UseClans": true,
"UseTeams": false,
To fix it for Clans Reborn just disable the UseTeams config option, @rfc1920, It seems to be an issue with how clans Reborn manages teams.
Since we are getting a sarcasm instead of investigating, i'll try it myself.
Its not chaos clans were broken, its all clans. In order to fully support both Clans from umod, you need to change 
string vclan = (string)Clans?.CallHook("GetClanOf", BasePlayer.FindByID(playerid));
string pclan = (string)Clans?.CallHook("GetClanOf", BasePlayer.FindByID(friendid));​

to

string vclan = (string)Clans.CallHook("GetClanOf", playerid);
string pclan = (string)Clans.CallHook("GetClanOf", friendid);

Which solves 2 problems: offline players, and universal Clans support. This information is easily accessible within umod website:
https://umod.org/plugins/rustio-clans#for-developers
https://umod.org/plugins/clans#for-developers
Chaos version is the same like first one, so it will start working as well. This information is also isn't private

GetClanOf(player:ulong|string|BasePlayer):string
Returns the clan tag of a player's clan or null if the player is not a member of a clan.

 

In order to fix teams you need to swap

bool IsFriend(ulong friendid, ulong playerid)

 

with

bool IsFriend(ulong playerid, ulong friendid)

Which is also a problem of offline player

PS: 
switching teams to false will not help, but just hide NPE's, because there is null-checks on clans section. If clanmate is offline you will simply get false from IsFriends(). And commands will not work anyway.

there is a another problem too. i use clansreborn

after i install the newest version of teleportation
players say they loose homepoint, because a clan member build the base
and they cant set a homepoint back because they dont own the base.

is this fixed with offlineplayers check then ? @topkek
Locked automatically