alleycat 28 Posted March 20, 2016 Wrote a ticket tracking script. But the conditions fail sleep 5; _txt = "Ticket-Tracker: Starting to track tickets"; _txt remoteExec ["systemchat"]; _tickets_blue = [west,0] call BIS_fnc_respawnTickets; _tickets_green = [resistance,0] call BIS_fnc_respawnTickets; while {(_tickets_blue > 1) or (_tickets_green > 1)} do { _tickets_blue = [west,0] call BIS_fnc_respawnTickets; _tickets_green = [resistance,0] call BIS_fnc_respawnTickets; sleep 2; }; _txt = "One team out of tickets, ending mission"; _txt remoteExec ["systemchat"]; The script only works if the while condition only checks for one teams tickets, like this: while {_tickets_blue > 1} do Why is the or condition faulty? EDIT because it needs AND instead of OR. moderator please remove Share this post Link to post Share on other sites
alleycat 28 Posted March 20, 2016 ---------------------------------- Share this post Link to post Share on other sites
donelsarjo 60 Posted March 20, 2016 Private ["_tickets_blue", "_tickets_green"]; Should solve this problem. It seems like the variables are out of scope. Share this post Link to post Share on other sites
alleycat 28 Posted March 20, 2016 Private ["_tickets_blue", "_tickets_green"]; Should solve this problem. It seems like the variables are out of scope. Thanks for the advice, but the scope was not the issue.I used OR instead of AND Share this post Link to post Share on other sites