global variable not updating

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2011   #1
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:

proc keepPresets(){
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.
 
Old 02 February 2011   #2
Maybe a spelling problem?

The variable is called $maxKeyframe and you set $maxkeyframe.
 
Old 02 February 2011   #3
Epic facepalm.

Cheers for pickign up on that man, its greatly appreciated, though I'm sorry to waste people's time on this one.
 
Old 02 February 2011   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:03 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.