Notifications
Clear all

[Closed] outer local variable reference

hi, I’m trying to use penAttributeHolder script in a rig script i’m writing.Ididn’t want it as a plugin but to be a part of the script, so I made some test with a simple box, create a rollout with button and it work fine, now when I insert it in my code it return the error : No outer local variable references permitted here.
[size=2]what’s the problem? it seems to not define the call of a variable, i even tried to move variable declaration inside the block where the error appear.
[/size]

2 Replies

Usually this error happens when there are no brackets with a local statement.
Is your main code between () ?

I found the mistake. in PEN script there many local variable called “ca” and in my script I already declared variable with this name for other use. so I change evrey “ca” in PEN script with other name