ID:143020
 
Code:
            MU(mob/M in world)

set category = "Admin"

set name="Mute/Unmute"
if(M.ckey in Muted)
Muted-=M.ckey
world<<output("[M.key] has been unmuted by [usr.key]!","GA")
return
else
Muted+=M.ckey
world<<output("[M.key] has been muted by [usr.key]!","GA")
var/list/Muted = list()
var/list/Banned = list()
var/list/ADMINS = list()
world/New()
..()
var/savefile/S=new("Admin.stuff")
S["MUT"] >> Muted
S["BAN"] >> Banned

world/Del()
var/savefile/S=new("Admin.stuff")
S["MUT"] << Muted
S["BAN"] << Banned
..()

Problem description:

When I allow it to load the lists, I cant mute/unmute properly.
A common problem people have with code like this is that after loading the lists, they forget to check if anything actually loaded. If any of those lists loaded as null, you have to re-create them.

Lummox JR
In response to Lummox JR
How would I recreate them if its loaded already?
In response to Madjarjarbinks
That's absolutely nothing like what Lummox JR said. What you need to do is, when loading the lists, check if they are equal to null. If they are, then you need to set them equal to list() so that they can be treated as lists.
In response to Garthor
How can I make them always equal list?
In response to Madjarjarbinks
Madjarjarbinks wrote:
How can I make them always equal list?

1) Load lists.
2) Check if lists are really null.
3) Replace any nulls with brand new lists.

I don't see what you're not getting here.

Lummox JR