Jump to content
Smart Games

BIS_fnc_drawRespawnPositions & BIS_fnc_showRespawnMenuPositionMapDraw Error message

Recommended Posts

_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

perhaps, _name or _pos remain undefined. Try  with: hint str [_name,_pos] before the Bis_fnc_addRespawnPosition.

  • Thanks 1

Share this post


Link to post
Share on other sites
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.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×