Can't Assign value from list to string variable
Hi there. I have a situation where I create a reference list in Deluge (Note, the list is declared as type string)
- StatusList = List:String();
- StatusList.add("");
- StatusList.add("Cold");
- StatusList.add("Warm");
- StatusList.add("Very Warm");
- StatusList.add("Hot");
I even declare my variable up front with an empty initialisation
- OldLoopStatus="";
Later in my code I have this:
- OldLoopStatus = StatusList.Get(LoopIndex);
I get this error:
Variable 'OldLoopStatus' is already defined of data type 'STRING' but trying to update '' data type
If I don't have the variable initialisation, then the assignment works, but I get an error when I try to compare OldLoopStatus to another string variable.
What am I missing here?
Regards
Jo