mercerqc 10 Posted August 5, 2018 So I'm trying to set up a flagpole that let's player who died to Teleport them back on a chopper that will land them back in the action. The flagpole activates this script. h1 is the variable name I gave to the chopper if ((h1) emptyPositions "cargo"==0) then {hint "The helicopter is full"} else { player moveincargo h1; }; The teleporting works fine, but it doesn't hint the player when the vehicle is full. What am I doing wrong? Thanks a lot Share this post Link to post Share on other sites
Harzach 2518 Posted August 5, 2018 There is no semicolon closing your hint line. Expand it the way you did your moveincargo line and you'll see the error. 1 Share this post Link to post Share on other sites
mercerqc 10 Posted August 5, 2018 Thanks for the answer, I tried this and it's still not working. Is it what you meant? if ((h1) emptyPositions "cargo"==0) then { hint "The helicopter if full!"; } else { player moveincargo h1; }; Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted August 5, 2018 5 hours ago, Harzach said: There is no semicolon closing your hint line. Expand it the way you did your moveincargo line and you'll see the error. You don't necessarily need closing semicolons before a closing bracket. The snippet should work fine as is, are you sure there's a chopper named h1 on the map? Is this in MP or SP or dedicated? Cheers 1 Share this post Link to post Share on other sites
Mr H. 402 Posted August 5, 2018 Quote if ((h1) emptyPositions "cargo"==0) try if ((h1 emptyPositions "cargo") ==0) Share this post Link to post Share on other sites
mercerqc 10 Posted August 5, 2018 Mr H. I just tried that, doesn't work either. Grumpy old man, yes there is, the teleportation works fine when there's an empty spot in cargo. The problem is with the hint if the helicopter is full, it doesn't appear and I am not getting any error messages. I'm currently trying just in the mission builder start a MP mission. Share this post Link to post Share on other sites
Harzach 2518 Posted August 5, 2018 7 hours ago, Grumpy Old Man said: You don't necessarily need closing semicolons before a closing bracket. Sometimes I should just back away from the keyboard :D 1 Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted August 5, 2018 2 hours ago, mercerqc said: Mr H. I just tried that, doesn't work either. Grumpy old man, yes there is, the teleportation works fine when there's an empty spot in cargo. The problem is with the hint if the helicopter is full, it doesn't appear and I am not getting any error messages. I'm currently trying just in the mission builder start a MP mission. Try your snippet in an empty mission just with the h1 named chopper, it works. Looks like the error is someplace else. Cheers Share this post Link to post Share on other sites
mercerqc 10 Posted August 5, 2018 I don't have anything else then the chopper, the flagpole with the action and a guy with Zeus. Is it possible that my game is blocking hints for some reason?. Anyway, I guess the guys will have to do with it. The TP works. Share this post Link to post Share on other sites
Harzach 2518 Posted August 5, 2018 OK, just tested in MP hosted and dedi and it works fine. You might want to consider sharing some more information, or even your mission file. Something is wrong. Share this post Link to post Share on other sites
mercerqc 10 Posted August 7, 2018 We have quite a lot of mods, so it would be a problem for you to launch it. None of the mods we have tho can really interfere with that, other then ACE or Acre, the others is just weapons and uniforms. Could it be my game? Like maybe the difficulty? Or some settings that blocks hints? Share this post Link to post Share on other sites
HazJ 1289 Posted August 7, 2018 Show the code at least. Not sure why you're having issues. It works for me. // where h1 is the name of the vehicle if (h1 emptyPositions "cargo" isEqualTo 0) exitWith { hintSilent "NO ROOM FOR YOU, SUCKA! ON YE BIKE..."; }; Share this post Link to post Share on other sites
Harzach 2518 Posted August 7, 2018 We don't need to load it to look at your scripts. That said, and as HazJ suggested, post the entire script that you are calling with your addaction. There are some very smart people here (not claiming to be one of them), but I can guarantee that exactly 0% of the members of this forum are clairvoyant. 1 Share this post Link to post Share on other sites
mercerqc 10 Posted August 7, 2018 Ok so on my flagpole I have this in the init this addAction ["Teleport to Chopper", "teleport\teleport.sqf"]; and this is my teleport.sqf file if ((h1) emptyPositions "cargo"==0) then { hint "The helicopter if full!"; } else { player moveincargo h1; }; I tried with if (h1 emptyPositions "cargo"==0), didn't work And I have a littlebird named h1 Sorry I thought it was clear and like I said, If the vehicle is empty or have space in the cargo, the Teleport works. It's the Hint if the chopper is full that doesn't. Thanks a lot for your help, I appreciate it! Share this post Link to post Share on other sites
Harzach 2518 Posted August 7, 2018 Works perfectly on my end. Do other hints appear for you? Share this post Link to post Share on other sites
mercerqc 10 Posted August 7, 2018 Yes I just tried a simple hint on a radio trigger and it worked. Share this post Link to post Share on other sites
mercerqc 10 Posted August 7, 2018 Oh my god, I figured it out. I just tried running the script like this _freePosCargo = (h1) emptyPositions "cargo"; hint str _freePosCargo; Just to see what was the variable and it showed me 2, when the vehicle is full... I guess the CUP Littlebird is like that So I just changed my script to _freePosCargo = (h1) emptyPositions "cargo"; hint str _freePosCargo; if ( _freePosCargo > 2) then { player moveInCargo (h1); } else { hint "The helicopter is full!" }; And it works now! Lol fuck Arma!!! Thanks for your help guys Share this post Link to post Share on other sites
pierremgi 4912 Posted August 7, 2018 see also this post as related cargo capacities... Share this post Link to post Share on other sites
Harzach 2518 Posted August 7, 2018 21 minutes ago, mercerqc said: Oh my god, I figured it out. I just tried running the script like this _freePosCargo = (h1) emptyPositions "cargo"; hint str _freePosCargo; Just to see what was the variable and it showed me 2, when the vehicle is full... I guess the CUP Littlebird is like that I just tried with a full CUP LB, and it returned 0. The CUP LB holds a total of ten: pilot, copilot, two in back, six on the benches.You might be forgetting the rear pax seats. Share this post Link to post Share on other sites
mercerqc 10 Posted August 7, 2018 Ok weird, cause I used Zeus and just dragged people in this, those 2 seats are probably not considered Cargo Share this post Link to post Share on other sites
Harzach 2518 Posted August 7, 2018 Not sure what you mean. I'm saying that with a full bird, emptyPositions "cargo" returns 0. Are you sure you have ten units in the bird? Share this post Link to post Share on other sites
mercerqc 10 Posted August 7, 2018 Yeah that's weird, mine only fits 8 total, including pilot and copilot. Maybe our CUP version is different then yours, I'm not sure. I'm not able to sit myself or AI through Zeus in those PAX Seats. But it's not a big deal. Thanks for your help Share this post Link to post Share on other sites
Harzach 2518 Posted August 7, 2018 I'm using latest version. It's clear that the issue is those two seats being empty in your bird. You have no units there, so emptyPos is returning 2. The question now is why you can't place units there in Zeus. It works fine in the editor. Share this post Link to post Share on other sites