That is because onMapSingleClick is one of those archaic hacks that BIS gave us sometime back in OFP 1.46, and hasn't seen fit to fix since (like addAction
) -> in other words, it doesn't use the {} code brackets, but "" quotes.
onMapSingleClick """markername"" setmarkerpos getmarkerpos ""markername2"""
In other words, for every string inside the quotes "", you need to add double quotes "" (which is why there are double quotes around the marker names). Something with no strings makes a lot more sense: onMapSingleClick "unit1 domove getpos unit2".
However, why activate this strange code with onMapSingleClick? usually you want to move markers TO the position you clicked, no? In that case you can use the local variable _pos, which funnily enough is called just that within the quotes ->
onMapSingleClick """markername"" setmarkerpos _pos"
Good luck!
Wolfrug out.