variable content is wrong [SOLVED, feature request?]
Posted: Fri Aug 14, 2015 8:34 pm
So I've got a function where I passed in some parameters. I'm trying to put the contents of an array into a temp variable using three of the parameters to specify the array position. It seems like two of the three variables work, but one of them doesn't.
I assumed I did something wrong, but Livecode seems to think that whatever's in pSeed is 6, and there is a key in sMainShort[1] called 6, but when I try to use pSeed to address the array with 6 it doesn't work.
I tried closing and reopening Livecode on the off chance it was a weird one-off bug but it persisted.
Code: Select all
function resourceRollup pDoc,pSeed,pDirection,pPayload -- pDoc is 1, pSeed is 6
put the keys of sMainShort[pDoc] into tKeys -- this works
put the keys of sMainShort[1] into tKeys2 -- this works
put the keys of sMainShort[pDoc][pSeed] into tKeys3 -- this does not work; returns empty
put the keys of sMainShort[pDoc][6] into tKeys4 -- this works
if pSeed is 6 then put true into tTest -- returns true
if pSeed is "6" then put true into tTest2 -- returns true
I tried closing and reopening Livecode on the off chance it was a weird one-off bug but it persisted.