You can use ASSERT() on most things, including lists, to make sure that something is what you need to be. However, if you try to ASSERT() a list index, you get a load of syntax errors
Code Snippet (if applicable) to Reproduce Problem:
mob/verb/Test()
var/list/L = params2list("a&b&c&d&e&f")
for(var/i in 1 to L.len)
ASSERT(L[i]) // this line causes it to fail
Expected Results:
This would ASSERT() each element in the list.
Actual Results:
*.dm:5:error: ]: expected ) *.dm:5: unterminated text (expecting ") *.dm:5: Inconsistent indentation or missing '}'. *.dm:5:error: bad embedded expression [] *.dm:5:error: ]: expected } *.dm:5:error: location of top-most unmatched { *.dm:5:error: ]: expected } *.dm:5:error: location of top-most unmatched
Workarounds: Use a temporary variable
mob/verb/Test()
var/list/L = params2list("a&b&c&d&e&f")
for(var/i in 1 to L.len)
var/temp = L[i]
ASSERT(temp)
But, I don't see anything that should fail an assert there.