Allthough i am not sure if this is the one causing the error, i see another typo/error in the code.
In the split you are ( at least it looks like ) filling the array varRetValue with the received values..
But then when calling a specific value of that array you use RetValue.
I like to use names for variables that specify what type it is.
So i do think it should be something like this ( if it is a typo and not just a missing space in the post )
var RetArray = VarReturnedValue.getValue().split(“,”,2);
or like you have it with just a added space.
varRetValue = var RetValue