My following formula script gives syntax error:
======
function preMain()
{
setStudyTitle("ndMA_SL");
setCursorLabelName("ndMA_SL",0);
setDefaultBarStyle(PS_SOLID,0);
setDefaultBarFgColor(Color.red,0);
setDefaultBarThickness(1,0);
}
function main()
{
var LX = new Array(0,0,0,0);
LX = call("ndMA_L_3pt2[3].efs",0.01);
return LX[3];
}
===========
Syntax error is "LX has no properties". Note that function
("ndMA_L_3pt2[3].efs" returns an array of 4 elements. If I replace the last statement with
"return LX"
then my script working fine, returning 4 values. I, however, want my script to return only the fourth elememt of the LX array.
Please tell me what to do and how to fix this error. Thanks.
Name: dzung nguyen
Email: [email protected]
======
function preMain()
{
setStudyTitle("ndMA_SL");
setCursorLabelName("ndMA_SL",0);
setDefaultBarStyle(PS_SOLID,0);
setDefaultBarFgColor(Color.red,0);
setDefaultBarThickness(1,0);
}
function main()
{
var LX = new Array(0,0,0,0);
LX = call("ndMA_L_3pt2[3].efs",0.01);
return LX[3];
}
===========
Syntax error is "LX has no properties". Note that function
("ndMA_L_3pt2[3].efs" returns an array of 4 elements. If I replace the last statement with
"return LX"
then my script working fine, returning 4 values. I, however, want my script to return only the fourth elememt of the LX array.
Please tell me what to do and how to fix this error. Thanks.
Name: dzung nguyen
Email: [email protected]
Comment