1. lol Yeah, you're right; it is iItems which is defined as a short. oItem is defined as a reference. I know, crappy variable naming on my part; I wasn't thinking about unitl I read your post.
2. I'll have to check how I'm doing this, but I think it's correct. oItem is a reference variable, so returning a value from the List should be ok, right?
3. Sorry, I didn't clarify. The List (yapmItemList) has 100 items in it. That was the first thing I checked because I thought that might be the case.
Hmm, I still have no idea how to make it work. Thanks anyway,
Rig
1. Is it iItem or iItems? you have both listed.
2. Short variables cannot hold hex values such as N as they function the same as INT variables. They also cannot hold alphanumeric letters like a FOSE string variable can. You'll need to find a workaround, or use numbers only and specify the results for each one.
3. GetRandomPercent returns numbers between 0 and 99. It will fail if your list doesn't have 100 items in it or a number higher than the last list entry is chosen. To get RND numbers between a minimum and maximum use the formula:
set VARIABLE to min + GetRandomPercent * (max-min) / 99