Error while compiling

I found this on staging today while preparing for the wipe.

Error while compiling HeliControl: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'BasePlayer' | Line: 1931, Pos: 37

Yeah needs update

HeliControl - Failed to compile: Argument 1: cannot convert from 'UnityEngine.Vector3' to 'BasePlayer' | Line: 1931, Pos: 37

change these two sections to update. thanks to Razor for helping me

NEW 1529
            {
                foreach (var heli in _PatrolHelicopters)
                {
                    var ai = heli?.GetComponent<PatrolHelicopterAI>() ?? null;
                    if (ai != null) StartStrafe(ai, target, ai.CanUseNapalm());
                }
            }
            else StartStrafe(HeliInstance, target, HeliInstance.CanUseNapalm());
            player.Message(string.Format(GetMessage("strafingOtherPosition", player.Id), target.displayName));
        }
NEW 1926
        private void StartStrafe(PatrolHelicopterAI heli, BasePlayer target, bool useNapalm)
        {
            if (heli == null || !(heli?.IsAlive() ?? false) || (heli?._currentState ?? PatrolHelicopterAI.aiState.DEATH) == PatrolHelicopterAI.aiState.DEATH || target == null) return;
            heli.interestZoneOrigin = target.transform.position;
            heli.ExitCurrentState();
            heli.State_Strafe_Enter(target, useNapalm);
        }​

o.reload HeliControl
[CSharp] Started Oxide.Compiler v successfully
HeliControl was compiled successfully in 1768ms
HeliControl has replaced the 'callheli' chat command previously registered by PersonalHeli

muVdbkPbhHfvAFs.png LizardMods

change these two sections to update. thanks to Razor for helping me

NEW 1529
            {
                foreach (var heli in _PatrolHelicopters)
                {
                    var ai = heli?.GetComponent<PatrolHelicopterAI>() ?? null;
                    if (ai != null) StartStrafe(ai, target, ai.CanUseNapalm());
                }
            }
            else StartStrafe(HeliInstance, target, HeliInstance.CanUseNapalm());
            player.Message(string.Format(GetMessage("strafingOtherPosition", player.Id), target.displayName));
        }
NEW 1926
        private void StartStrafe(PatrolHelicopterAI heli, BasePlayer target, bool useNapalm)
        {
            if (heli == null || !(heli?.IsAlive() ?? false) || (heli?._currentState ?? PatrolHelicopterAI.aiState.DEATH) == PatrolHelicopterAI.aiState.DEATH || target == null) return;
            heli.interestZoneOrigin = target.transform.position;
            heli.ExitCurrentState();
            heli.State_Strafe_Enter(target, useNapalm);
        }​

works, thanks! :)

Same here!

Thank you

thank you

FullGamer

Same here!

so did you fix it or do you have the same error?

AaKRLmoAH10fJdP.png LizardMods

so did you fix it or do you have the same error?

Im going to fix it! Thanks!

Merged post

Now its working, thanks again!
DX2N53QfpFfcUlX.png LizardMods

so did you fix it or do you have the same error?

Hey, for me nothing changed..even after all the FP+oxide updates. 

Hotfix didn´t work for me. Heli Control doesn´t compile and Heli don´t shoot. If a player shoots him down to under 200HP, he instantly goes up again to
10K HP

Okay, worked it out, it should say "New 1525" not "New 1529" and other than that it works great thank you very much. 🙂

heli ride when you get out of noclip the patrol heli doesn't blow up now, any way to fix it fleeing?

Maxxx

Hey, for me nothing changed..even after all the FP+oxide updates. 

Hotfix didn´t work for me. Heli Control doesn´t compile and Heli don´t shoot. If a player shoots him down to under 200HP, he instantly goes up again to
10K HP

Yes, it works of course. It was my fault... Bracket error due to my incompetence. 😒