Forum Discussion
KevinMcGlone
10 years agoCommunity Member
Hi Jean,
Thanks again for coming back I appreciate your help.
I have found my issue with the help of a fresh set of eyes.
It was a Case issue in the function I was using for setting.
The 's' in 'SetVar' is lower case in Zsolts original post where I copied the function from.
Everything works as it should now.
Moral of the story, Always verify syntax and case in all code. :-)
Thanks again and hopefully this helps others.
Happy Friday! :->
Correct working syntax functions copied directly from my working JS file below:
function getVariable(vName){
var player=GetPlayer();
var myVar = player.GetVar(vName);
return myVar;
}
function setVariable(vName,vValue)
{
var player=GetPlayer();
var myVar = player.SetVar(vName,vValue);
return myVar;
}