03-17-2020 10:34 AM
Hello, (
I have this code in a Do step and it's giving the error, "Unable to parse the expression; b is already defined (line:3 , col:5). I do not even have a variable named 'b' defined in the script. I am confused about this error. Can someone please help me?
{
int a =0;
for(int b=0; b<sStringOfTypeArray.length; b++){
boolean isdistinct = true;
for(int j=0; j<b; j++){
if(sStringOfTypeArray[b] == sStringOfTypeArray[j]){
isdistinct =false;
break;
}
}
if(isdistinct){
System.out.print(sStringOfTypeArray[b]+" ");
ArrNewMfrList[a]=sStringOfTypeArray[b];
a++;
}
}
}
Thanks in advance.
Solved! Go to Solution.
03-17-2020 01:06 PM
Yeah, it's a quirk with the expression language (based on Java, but not 100% Java).
Instead of this:
for (int i = 0; i < 10; i++) { /* do something */ }
Do this:
int i; for (i = 0; i < 10; i++) { /* do something */ }
03-17-2020 01:06 PM
Yeah, it's a quirk with the expression language (based on Java, but not 100% Java).
Instead of this:
for (int i = 0; i < 10; i++) { /* do something */ }
Do this:
int i; for (i = 0; i < 10; i++) { /* do something */ }
03-17-2020 02:22 PM
03-17-2020 02:35 PM - edited 03-18-2020 03:22 PM
Does System.out.print do anything in UCCX? I've never tried that.
EDIT: Looks like it breaks your script. ;)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide