ID:1672584
 
(See the best response by Jittai.)
So I'm trying to allow players to make characters that get stats from playermade clans (if the clan chooses to let people do so). For example if strength and defense stats are inherited by people of X clan they get them on creation. I'm really bad with lists other that are associative or its a list within a list. Do I make it so that a new list is created for each clan that allows this, which holds the inherited stats and then put that list in a list which holds all the clans that have this option. Then the player chooses the clan out of said list, then accesses the list with the inherited stats. Seems like the best way to do it, but is there a better way? Can this all be done with one list?
Best response
Make each clan a datum. Make a proc under these clan datums handling adding people to and from clans.

You could use typesof to store each of one clan in a global list for later use.
Clans are currently handled by a clan dantum, but I'm not sure how to get to add a list with a variable name to another list.

e.g.
global.cclans += new/list/[src.name] = list("clanstr" = src.clanstr)


global.cclans holds all the clans that will allow people to create into their clan. src is the clan itself. I can't just += src because the clan deletes itself when no one in that clan is online. When the person chooses the option to allow people to create into their clan it creates a new list that has the same name as the clan. The contents of that list have the clan's inherited stat mods.
You should just make mirror vars for what ever stats you need edited. Vars with in the clan datum that reflect the var it edits in the mob. You could even make them the same thing name wise.
The problem is mainly with the execution. I'm not sure how to add all those mirror verbs into a list, then add that list into global list. I've tried what I posted before and it drew an error, presumably because it has two = statements in it.

Tried
cclans.Add("[src.name]"=list("clanstr" = clanstr))

and it didn't work either. Each time it would give an error.
runtime error: Cannot execute null.Add().
proc name: ClanLogin (/Clan/proc/ClanLogin)
usr: the test (/mob)
src: test (/Clan)
call stack:
test (/Clan): ClanLogin(the test (/mob))
the test (/mob): Clan Login Settings()

So how do I do that?