Author Topic: rfcName is null in SendRFC  (Read 4535 times)

phoenix

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 49
    • View Profile
rfcName is null in SendRFC
« 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;
         }

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: rfcName is null in SendRFC
« Reply #1 on: November 28, 2016, 11:16:41 AM »
Makes sense. I will make the changes on my end too, thanks!