Arma 3
HUNTER SIX - Special Operations Unit
Proper using of getVariable command
Always! Always use getVariable with default value:
<object> getVariable ["variableName", <defaultValue>];

EXAMPLE:
_unit getVariable ["someVar", 0];
// or
waitUntil {_rebel getVariable ["inJail", 0] == 1};

You have a lot of script errors because if variable is not defined it returns nil value.