Matt,
C#Script is based on JScript and the latter does not support out parameters, so you have to search for workarounds.
I'm glad to hear you have found a solution. A possible alternative to global variables is using arrays (see the code snippet below). You pass an array as a parameter to your function and change the array elements in it. The arrays are passed by reference, so you can use your array's elements after your function returns.
function Caller()
{
// Create an array
var arr = new Array(4);
arr[0] = 10;
arr[1] = true;
// Call your function
Callee(arr);
// Check out parameters
Log.Message(arr[2]);
Log.Message(arr[3]);
}
function Callee(arr)
{
// Use the in parameters somehow
Log.Message(arr[0]);
Log.Message(arr[1]);
// Set the out parameters
arr[2] = "Hello!";
arr[3] = 123;
}