```
allMapMarkers apply {deleteMarker _x};
for "_i" from 1 to 5 do
{
_marker = createMarker ["m_" + str _i, player];
_marker setMarkerType "hd_dot";
_marker setMarkerDrawPriority (10 - _i);
};
//Correctly sorted e.g m_5, m_4... instead of m_1, m_2...
systemChat format ["Correct Order: %1", allMapMarkers];
_marker = createMarker ["m_final", player];
_marker setMarkerType "hd_dot";
//incorrectly sorted
systemChat format ["Incorrect Order: %1", allMapMarkers];
//Sort allMapMarkers by priority
"m_1" setMarkerDrawPriority (markerDrawPriority "m_1");
//Correctly sorted
systemChat format ["Correct Order: %1", allMapMarkers];
```