1. This is specific to this particular effect. No other effect has caused be any trouble to date.

    Code:
    string fire = "assets/bundled/prefabs/fx/player/onfire.prefab";void doBurningEffects(BaseCombatEntity target)
            {
             
                BasePlayer player = target as BasePlayer;
                 
                Vector3 entityPosition=target.GetEstimatedWorldPosition();
                Vector3 burnPosition=new Vector3(entityPosition.x, entityPosition.y+1f, entityPosition.z);
             
                 
                if(player!=null&&burningEntities.ContainsKey(player))
                {
                    global::Effect.server.Run(fire, player, 8, burnPosition, burnPosition);
                    timer.Once(2.5f, () =>
                    {
                        doBurningEffects(target);
                    });
                }
     
            }
    This is the error in question:


    Code:
     at (wrapper managed-to-native) UnityEngine.Behaviour:set_enabled (bool)
      at PrefabInfo.SetBehaviourEnabled (Boolean state) [0x00000] in <filename unknown>:0
      at PrefabInfoEx.AwakeFromInstantiate (UnityEngine.GameObject gameObject) [0x00000] in <filename unknown>:0
      at EffectLibrary.CreateEffect (System.String strPrefab, .Effect effect) [0x00000] in <filename unknown>:0
      at EffectLibrary.GenericEffectSpawn (.Effect effect) [0x00000] in <filename unknown>:0
      at EffectLibrary.Run (.Effect fx) [0x00000] in <filename unknown>:0
      at EffectNetwork.OnReceivedEffect (Network.Message msg) [0x00000] in <filename unknown>:0
      at Client.OnNetworkMessage (Network.Message packet) [0x00000] in <filename unknown>:0
      at Facepunch.Network.Raknet.Client.HandleMessage () [0x00000] in <filename unknown>:0
    Seems like the issue is sourceConnection being null. Any idea what to list instead?

    Thank you in advance!
     

    Attached Files:

    Last edited by a moderator: Aug 26, 2017
  2. Where are you calling this method from? Like a hook, command? That's probably the reason. Also, the actual exception name would be useful to include in the error, not where it errored :p
     
  3. That's all there was in the console. The error the client gets before getting kicked is this:
    [DOUBLEPOST=1503803507][/DOUBLEPOST]And yeah, I'm calling it from a hook.
     

    Attached Files:

  4. Which hook? :p
     
  5. I'm using the OnPlayerDamage hook from HooksExtended - I believe it's a derivative of the OnEntityHurt hook.
     
  6. Wulf

    Wulf Community Admin

    If you're using a hook from a plugin, please use it's support thread.
     
  7. Maybe try sticking it in a NextTick callback. If that doesn't work, then yea, what wulf said.
     
  8. The hook isn't the issue. The issue is specific to a particular effect. I'm trying to find a way to properly utilize it.
    [DOUBLEPOST=1503845470][/DOUBLEPOST]The error occurs when the effect "plays out". The visual effect lasts for maybe 3 or so seconds, the sound lasts for more. Once the sound ends, this error occurs. Sometimes the effect kicks the player when it's created.
     
  9. I've resorted to attaching a FireBall to a player, instead. Thanks for help.
     
  10. Lol, did you two even read the error? It is obviously a client-side error related to the effect.
     
  11. Wulf

    Wulf Community Admin

    No, I don't read every thread and every post.
     
  12. Fair enough, I don't expect you to. I just found it a bit odd, or maybe even funny, that you had suggested using a plugin's support thread when the actual issue just appears to be a Rust bug with the effect. ;)
     
  13. Wulf

    Wulf Community Admin

    Probably poorly worded on my part, but more of a suggestion not use a plugin's support thread if you do have an issue using something from it. I didn't look into the details of the thread, just a suggestion.