Whenever i execute this script it would always say "0 is not a member of folder" in the output.
if CurrentItem > 4 then
CurrentItem = 1
end
Whenever i execute this script it would always say "0 is not a member of folder" in the output.
if CurrentItem > 4 then
CurrentItem = 1
end
If CurrentItem variable is a value, then try to do:
if CurrentItem.Value > 4 then
CurrentItem.Value = 1
end
but if it's something else than a value, you should find a variable or an IntValue assigned to the CurrentItem var. and do CurrentItem.IntValue.Value instead of CurrentItem.Value in the code up there.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
You cannot directly compare an object with an integer. If CurrentItem is a number, you need to give a lot more context and code.
What is CurrentItem, give full script, define CurrentItem, try CurrentItem.Value