|02 February 2011||#1|
Join Date: May 2006
global variable not updating
Hey guys, I've hit a bit of a wall of late and can't find much help through searches, so I figured I should throw something out on the boards.
I have a global variable in a proc which I want to update. The proc is small and as follows:
global int $maxKeyframe;
$maxkeyframe = (`intField -q -v intFieldMaxTime`);
The global variable has already been declared at the top of the script, and it has already been successfully changed in another proc (lets call it procX). However, if I get it to print out the value of $maxkeyframe during and after this proc, then it stubbornly keeps the value it was assigned in procX. And if I get it to print out the value of (`intField -q -v intFieldMaxTime`), then it works. Its as if it completley ignores the $maxkeyframe = (`intField -q -v intFieldMaxTime`) line.
I'm at a bit of a loss here. I don't usually use a lot of global variables, but I do use them occasionally. And I have never encountered this before. Am I doing something wrong?
Any help would be greatly appreciated.
|Thread Closed share thread|