Sorry if the title is a little confusing, I am trying to have a procedure that containts a proxy text that will be replaced after, but the only way I can create the procedure is if I declare the variable inside the procedure and that ruins my intention // Create variable string $vartest = "test"; // Check print print…
I'm not entirely sure if this is actually what you want but maybe try passing the variable as an input: proc procTest(string $varTest)<br>{<br>print $varTest;<br>}<br><br>procTest($varTest);
The reason this is happening is because Maya's variable scope is a bit weird in that variables inside functions are separate from everything else. You need to declare it as global inside the function likeglobal string thisIsGloba; Here's a short example of how the scope works.string $scope = "This is…
You can, as in the example above if you want to use a variable declared outside a function(procedure) you need to declare the variable inside the function as global. So if you have a variable declared outside a function like string $variable = "Hello Polycount"; inside the function you would typeglobal string $variable;…