Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

the output would i always result to "0 is not a member of folder"?

Asked by 5 years ago

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
0
You cannot directly compare an object with an integer. If CurrentItem is a number, you need to give a lot more context and code. pidgey 548 — 5y
0
What is CurrentItem, give full script, define CurrentItem, try CurrentItem.Value greatneil80 2647 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.

Ad

Answer this question