GETTING VARIABLE AWAY FROM EXPRESSION
Maybe this is laughable question however I can't handle with this one.
How to get variable "lInst" outside this code so I could use it in different place of code or diffrent script. Now when I check value of "lInst" inside this expression is different then outside. I tried with return as function and still nothing.
This is my code which search for missing plugins:
(
local t = stringstream ""
apropos "*missing*" to:t
t = t as string
local l = filterstring t "\n "
local lMissingClasses = #()
for t in l do
(
if matchpattern t pattern:"missing*" then
(
local cls = execute t
if matchpattern (cls as string) pattern:"missing*" then
(
global lInst = getclassinstances cls
----->VARIABLE I WANT TO GET VALUE FROM HERE IS: lInst
)
)
)
)
----->I WANT HAVE VALUE OF VARIABLE lInst HERE(outside expression above)
Comments
still nothing, won't work
still nothing, won't work
.
Execute the code. The value of lInst will be printed in the listener. Then open maxscript listener, type lInst and press the numpad Enter.
I don't have missing plugins, so the value is always an epmty array.
Tools and Scripts for Autodesk 3dsMax
...
U already declared your variable as global.
Maybe is better to put it above
bga