ID:2534466
 
Resolved
Using a for-list loop with a filters list didn't work, resulting in "bad list index" errors.
BYOND Version:512
Operating System:N/A
Web Browser:N/A
Applies to:Dream Daemon
Status: Resolved (513.1506)

This issue has been resolved.
Descriptive Problem Summary:

Looping through a list of filters doesn't work correctly.

Code Snippet (if applicable) to Reproduce Problem:
for(var/F in object.filters)
if(F:type == "blur")
...


Expected Results:

The filters should be accessible in the list.

Actual Results:

The loop fails with a "bad list index" error message.

Workarounds:

Loop through the list by numerical index from 1 to len, instead of using DM's for-list statement.
for(var/i in 1 to object.filters.len)
var/_dm_filter/F = object.filters[i]
if(F.type == "blur")
...
Lummox JR resolved issue with message:
Using a for-list loop with a filters list didn't work, resulting in "bad list index" errors.