function VariableParamFunc(...) local p1 = 0; local p2 = 0; local p3 = 0; local mInst = 0; local inst = mc.mcGetInstance(mInst); p1, p2, p3 = select(1, ...); if p1 == nil then p1 = "nil"; end if p2 == nil then p2 = "nil"; end if p3 == nil then p3 = "nil"; end mc.mcCntlSetLastError( inst, "p1 = " .. tostring(p1).. " p2 = ".. tostring(p2).. " p3 = ".. tostring(p3)); end if (mc.mcInEditor() == 1) then VariableParamFunc(); VariableParamFunc(2,3,4); end --You can pass as many params as you want, by putting in the function --variables that get them via the order them come in at. --this example handles three. --Scott