The “flags” return a number “5”. It’s not clear to me whether this is the total number of flags possible, or number of flags assigned, or THE flag assigned. There are five flags listed. My Studio setting should have this parameter set as GLOBALS
The problem I’m trying to solve is that when I try to change this parameter, I’m told the parameter is invalid, so I’m trying to debug that by checking the parameter description. I’m using the “event parameter” example as a place to learn how to do this.
“event_parameter.js:35 Uncaught Error!!! ‘An invalid parameter was passed to this function.’”
Good to hear the issue is solved, to answer your question about the flags would it be possible to get the full script that you used? I am not sure how you got those values.
I printed paramterDesc.flags to the console log using the below, starting line 158, I added lines 164 and 165:
// Find the parameter once and then set by ID
// Or we can just find by name every time but by ID is more efficient if we are setting lots of parameters
var paramDesc = {};
CHECK_RESULT( eventDescription.val.getParameterDescriptionByName("Surface", paramDesc) );
gSurfaceID = paramDesc.id;
//trying to discover what flag is assigned to the parameter
gSurfaceFlags = paramDesc.flags;
console.log("flags", gSurfaceFlags);
I get this response in the console:
flags 24
I’m not sure how this corresponds to the flag type assigned. Is this maybe the number of flags? I was trying to verify that assigned flags to a particular parameter was global to aid in it’s value manipulation
This has been a bit of a learning experience for me as well.
The flags can be a combination of more than 1, so when getting the result of 24 and looking at the list of possible flags