Smart Games 76 Posted July 19, 2021 _flag addAction [ "Create Respawn Position", { params ["_target", "_caller", "_actionId", "_arguments"]; private _name = [getPos _target] call JF_fnc_NearestLocationName; private _pos = [getPos _target, 1, 50, 3, 0, 20, 0] call BIS_fnc_findSafePos; [west, _pos , _name] spawn BIS_fnc_addRespawnPosition; [_target, _actionId] remoteExecCall ["JF_fnc_RemoveAction", allPlayers]; private _blackListLocations = missionNamespace getVariable "blacklist_locations"; _blackListLocations pushBack _name; missionNamespace setVariable ["blacklist_locations", _blackListLocations]; }, nil, 1.5, true, true, "", "true", 5, false, "", "" ]; ERRORS: setmarkertypelocal _type //... Error: undefined variable in expressions _type //in fn_drawRespawnPositions.sqf line 33 _map drawicon [ //... Error: type any, expected string //in fn_showRespawnMenuPositionMapDraw.sqf line 39 I really don't know what's going on here. It creates the respawn position (i can select it and spawn there), but it shows these error messages as well. The little map marker on the spawn position won`t draw. Actually, I should not have any influence on these functions and produce errors. Do you know the reason for this? Share this post Link to post Share on other sites
pierremgi 4739 Posted July 19, 2021 perhaps, _name or _pos remain undefined. Try with: hint str [_name,_pos] before the Bis_fnc_addRespawnPosition. 1 Share this post Link to post Share on other sites
Smart Games 76 Posted July 20, 2021 9 hours ago, pierremgi said: perhaps, _name or _pos remain undefined. Try with: hint str [_name,_pos] before the Bis_fnc_addRespawnPosition. I found the problem and once more it was me, who didn't read well enough. BIS_fnc_findSafePos is supposed to return an array of type [x,y]. Most of the other BIS functions (including my own functions) need an array of type [x,y,z] to work properly. I just rewrote the function to return an array of the right type and everything is working like a charm. 1 Share this post Link to post Share on other sites