Forum Discussion
SebastienGreffe
12 years agoCommunity Member
WebObject and Storyline Variable
Hi!
I have a problem, I need to use a webobject with my project, but my webobject needs some informations. So, I put them in variables in Storyline and now my problem is how I can give them in th...
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;
}