var/mob/human/list/mobs |
Yes, T is defined and all that, the problem is that it's not looking into what the list has or whatever and looking through each "item" the list contains. I want it to work, my understanding of lists is very limited. I suppose that indexes might be the fix? I don't know.
There are several early problems here, and then it ends with something that is also wrong, but I'm not sure quite what you're after.
When defining lists, you don't use the format var/mob/human/list/mobs --- all lists are defined in the following way: var/list/mobs, and can contain any data type.
Before adding data to a list, you first need to initialize it (otherwise the list is null, and you can't add to a null list). To do this, you can use the new operator or the list() proc:
The last if() statement boggles me. Since mobs is a /list, "[mobs]" == "/list". Also, lists only have one variable: len. There is no invisibility attribute. For this reason, I assume you're trying to access the individual mobs in the list, and I'm not sure what you're trying to do with them. Perhaps t is a text string containing names of mobs that should be invisible? In this case, you can simply change the logic when you add the mob to the list. Also, keep in mind that the first argument to findText() is the string to be searched, and the second is the value you're searching for. If you're ever unsure of this, you can access a local DM Reference by pressing F1 in DreamMaker. Rewritten logic based on my understanding of your problem may be like so:
I hope this helps. If you have further questions, feel free to ask.
Hiead