added error return to putGeoObject function

This commit is contained in:
Valmo Trindade
2024-07-28 20:20:15 -03:00
parent e32507b70b
commit 1236f36176

View File

@@ -1,12 +1,14 @@
params["_unit"]; params["_unit"];
private _uid_string = "armatak" callExtension ["ManageGeoObject/putGeoObject",[_unit] call armatak_fnc_extract_info]; private _result = "armatak" callExtension ["ManageGeoObject/putGeoObject",[_unit] call armatak_fnc_extract_info];
private _uid_string = _uid_string select 0; private _uid_string = _result select 0;
if (_uid_string != "") then { if (_uid_string != "") then {
_uid_string = (_uid_string splitString '"') select 3; _uid_string = (_uid_string splitString '"') select 3;
_unit setVariable ["_atak_uid",_uid_string, true]; _unit setVariable ["_atak_uid",_uid_string, true];
} else {
_uid_string = _result "ERROR: " + joinString " | ";
}; };
_uid_string _uid_string