Array Problems :(
Posted: Thu Jan 17, 2008 4:12 am
so when I try to assign the value of an array element to a variable, it won't do it, leaving the variable unchanged. I'm sure there's probably some esoteric way to go about it, but I don't know it and can't seem to find it in the documentation. For example, if I do:
holdervar=MyArray[0];
this won't assign the value of MyArray[0] to holdervar, but leaves holdervar with its original value, regardless if it is a string or an integer. However, I am able to read out of MyArray[0] perfectly using the various functions that come with RealityFactory such as the ShowText function among others. In this vein, I've used this ability to form a work around that is almost perfectly functional, except that it converts everything into a string:
holdervar = "" # MyArray[0];
Because functions like the concatenate function (#) can read MyArray[0] this works but clearly converts holdervar into a string. A further workaround of course is to use the Integer() function to convert back when necessary but when I don't know what type of value to expect this fails.
Any help on this problem would be greatly appreciated!
holdervar=MyArray[0];
this won't assign the value of MyArray[0] to holdervar, but leaves holdervar with its original value, regardless if it is a string or an integer. However, I am able to read out of MyArray[0] perfectly using the various functions that come with RealityFactory such as the ShowText function among others. In this vein, I've used this ability to form a work around that is almost perfectly functional, except that it converts everything into a string:
holdervar = "" # MyArray[0];
Because functions like the concatenate function (#) can read MyArray[0] this works but clearly converts holdervar into a string. A further workaround of course is to use the Integer() function to convert back when necessary but when I don't know what type of value to expect this fails.
Any help on this problem would be greatly appreciated!