Do squirrel have pass by reference

Started by habi, Mar 11, 2022, 04:10 AM

Previous topic - Next topic

habi

I was trying to pass a variable by reference.
The only solution i found was creating an array of single element and pass it.
function inc(i){i[0]+=1}
local a=[4];inc(a);print(a[0])
[SCRIPT]  5

Do anybody any other way?

DizzasTeR