Notifications
Clear all

[Closed] references

Hey,

Fn Test var =
(
var = 5
)

i = 1
Test i
break()

i is still 1 … how do I send i to the function so it is changed outside the function as well?

3 Replies
(
    function test &var =
    (
        var = 5
    )

    local i = 1
    format "i: %
" i

    test &i
    format "i: %
" i
)
  • Enrico

thx! appreciate it alot

For more information on using the “&” look up “By Reference Parameter Passing” in the Maxscript help.

-Eric