trigger
[thislist] exec "script.sqs"
script
_who = _this select 0
hint format["%1",_this]
or
trigger
[thislist select 0] exec "script.sqs"
hint format["%1",_this]
There are other ways.
Can't really say about the undefined variable, check spelling make sure all other syntax is correct as it can cause errors like this. What are you coding in sqf or sqs there are differences.
If I had 13 objects I'd put them in an array. In one of the units init put
objlist = [object1,object2 ect];
The when you want to delete them
{deletevehicle _x} foreach objlist;