Are you looking for the object closest to the player, riffleman? You can just put player
as the first parameter of the script:
[player, 5, 12, trigALLwest] exec "joinUpUnits2.sqs"
The closest object to the player is always the player.
Of course, bedges is right, you can use the "Show IDs" button to show the ID numbers of map objects.
Does that answer your question?