ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
209 stars 26 forks source link

Pass parameters as an array #252

Open ItsDeltin opened 3 years ago

ItsDeltin commented 3 years ago
void Subroutine(define var1, define var2, define var3) 'My Subroutine'
{
}

Each parameter will need to be set when Subroutine is called: var1 = value1, var2 = value2, var3 = value3

This can get a bit egregious with lots of parameters and lots of calls. Alternatively, all the parameters can be passed at once: parameters = [value1, value2, value3]

Optionally, the subroutine can unfold the parameters inside like so: var1 = parameters[0], var2 = parameters[1], var3 = parameters[2]