You may find it easer to create the marker befor the mapclick, while using the mapclick to set the position of the marker.
Example
// -delete the marker even if it does not exsits yet.
[b]DeleteMarker[/b] "rfpoint";
// -Create the new marker.
_marker= [b]createMarker[/b] ["rfpoint",[0,0,0];
_marker setMarkerColor "ColorBlue";
_marker setMarkerType "Flag";
_marker setMarkerText "Reinforcement point";
// -Get the Map click.
GetClick = true;
hint "Mark a reinforcement point on your map";
onMapSingleClick { "rfpoint" [b]SetPos[/b] _Pos; GetClick = false;
waitUntil {!GetClick};
hint "Reinforcement point marked";
There is something I think you may want to remove, The "unmarked = false;" and "waitUntil {!unmarked};" are not needed, however are needed if you intend on marking more then one positon at a time, you may want to consider a wait until map is closed kinda thing.
WaitUntil {![b]VisableMap[/b]};
here is an example I have created for you.
// -The script is called.
// -delete the marker even if it does not exists yet.
[b]DeleteMarker[/b] "RefLz";
// -Create the new marker.
_marker= [b]createMarker[/b] ["RefLz",[0,0,0];
_marker setMarkerColor "ColorBlue";
_marker setMarkerType "Flag";
_marker setMarkerText "Reinforcement point";
// -Open the map for Input.
[b]showMap[/b] True;
// -Get the Map click.
Hint "Mark a reinforcement point on your map";
[b]onMap[/b]Single[b]Click [/b]{"rfpoint" [b]SetPos[/b] _Pos};
// -Wait until the map is closed before continuing.
waitUntil {![b]VisableMap[/b]};
// -Clear the Mapclick Handle.
onMapSingleClick "";
// -[b]run[/b] your code.
I did not test this but I am sure if gives the idea.