Announcement

Collapse
No announcement yet.

Why doesn't this work?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why doesn't this work?

    Why doesn't this work?

    I am almost sure the addaction line is wrong... but i wasn't sure how to format it. I read the wiki, but still don't really understand it. It should add the action only when the player has a laser designator.
    Code:
     
    if (((isserver) && (local player)) || !(isserver)) then 
    {
    waitUntil {player==player};
    player addAction ["Air Support console", "mando_bombs\mando_airsupportdlg.sqf",","player hasWeapon 'LASERDESIGNATOR'"];
    };
    This other script works off the same principle and works fine:

    Code:
     
    if (((isserver) && (local player)) || !(isserver)) then 
    {
    waitUntil {player==player};
    player addAction ["Request Fire Mission","bon_artillery\dialog\openMenu.sqf",["Arti_dlg"],-1,false,true,"","player hasWeapon 'LASERDESIGNATOR'"];
    };

  • #2
    Re: Why doesn't this work?

    You've got a single quotation mark between the script call and the limiter.

    Comment


    • #3
      Re: Why doesn't this work?

      Also, due to how function overloading works in BIS script, I don't think you can pick and choose which parameters to use.

      So, if you want to use the last parameter, you have to use all the ones in between.

      So:

      Code:
      player addAction ["Air Support console", "mando_bombs\mando_airsupportdlg.sqf", [],  -1, false, true, "", "player hasWeapon 'LASERDESIGNATOR'"];

      Comment


      • #4
        Re: Why doesn't this work?

        Thanks lads.

        Comment

        Connect

        Collapse

        TeamSpeak 3 Server

        Collapse

        Advertisement

        Collapse

        Twitter Feed

        Collapse

        Working...
        X