Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: phoenix on November 28, 2016, 03:11:36 AM

Title: rfcName is null in SendRFC
Post by: phoenix on November 28, 2016, 03:11:36 AM
ArgumentNullException: Argument cannot be null.

I had to add a little code here because I still use bytes only to send RFC's

void SendRFC (byte rfcID, string rfcName, Target target, bool reliable, params object[] objs)
   {
#if UNITY_EDITOR
      if (!Application.isPlaying) return;
#endif
      if (parent == null)
      {
         if (hasBeenDestroyed || !enabled) return;

#if UNITY_EDITOR
         if (rebuildMethodList) RebuildMethodList();

         CachedFunc ent;
         
         if(rfcName==null){
            if (!mDict0.TryGetValue(rfcID, out ent))
            {
               Debug.LogWarning("RFC " + rfcID + " is not present on " + name, this);
               return;
            }
         }
         else if (!mDict1.TryGetValue(rfcName, out ent))
         {
            Debug.LogWarning("RFC " + rfcName + " is not present on " + name, this);
            return;
         }
Title: Re: rfcName is null in SendRFC
Post by: ArenMook on November 28, 2016, 11:16:41 AM
Makes sense. I will make the changes on my end too, thanks!