Merc, Like what you did with the sandbox dialog! I've always wanted to type/test script commands while in a game, but you gave me the tool to do it! I first thought it was just for typing text, but it was cool when I used it to "soldiereb" createunit [getpos player,mygrp] !!
:-\
Mr.Peanut...
From what I can see there is no difference between the 2.
As the call command requires you to pass it something as a string... in both cases you do just that!
In the first example global is set to a command right,
but when you want to execute it using call it has to be in string format (pardon the pun)
so you use the format, which just turns whatever global contained into a string.
global used to be player setdamage 1 and after format became "player setdamage 1"
In the second case, I attempted to save time (and maybe some processing - but I'm not too sure of this)
by already creating the command as a string.
This means that call can just call the string and effectively execute the same command in the same format.
from the start global was "player setdamage 1"
WRT my _theunit example...
In my initial question (the one that started this thread), I just took it from a script, not paying attention to the fact that at the top of the script...
_theunit select 0
...was what caused my confusion. This is due to the fact that it is important to understand what type of variable the variable is prior to you using the call or call format command
Hence, in my sample script I wrote to figure it all out...I came to the conclusion that if an object is passed to the script as one of the parameters, then there is no need to call format it nor call it, especially if you are going to use it as they type is was given
For this example only, I use getpos.
Getpos requires an object in order to work
I pass it in this example as the object
So I do not need to call anything as I have what I wanted
eg [player] exec "thisscript.sqs"
_MyUnit = this select 0
_MyPos = getpos _MyUnit
However, if I passed the editor name to the same script,
I would have to change it to use call to resolve the text name associated to the object I actually wanted in the first place
eg ["PlayerNameAsItIsInTheEditor"] exec "thisscript.sqs"
_MyUnit = this select 0
;at this point _MyUnit is just text but what I need to be able to getpos is the object, so I
_MyUnit = call format ["%1"_MyUnit]
***or I could have said***
_MyUnit = call _MyUnit
;1st _MyUnit - which took _MyUnit and made sure it was text and
;then called the associated object assigned to the text. ie. the acutal player who's name was "PlayerNameAsItIsInTheEditor"
;when I realised what it was doing, I also figured that if call looked for text and the parameter passed was already text
;then why format text into text and you could just use 2nd _MyUnit. It did the same thing!
_MyPos = getpos _MyUnit