I was wondering what would be an easier way to do that and not have it associated with the mob so i dont get save problems.
heres an example of what im talking about:this is my guild datum and one of the verbs
Guild
var/name
var/list/players
var/members=0
New(mob/M, nm)
name = nm
players = list()
Add(M)
Guilds += src
Del(mob/N)
Guilds -= src
N.guildowner=4
for(var/mob/M in players)
M << "[N] disbands [name]."
Remove(M)
..()
proc/Add(mob/M)
players << "[M.name] joins the guild."//like here i need to cycle through players in teh world to make it work
players["[M.name]"]="[M.key]"//this is how im currently adding them but would be easier if i could do this players[M]="[M.key]"
M << "You [(players.len>1)?"join":"form"] [name]."
M.guild = src
if(players.len==1)
usr.guildtitle="Leader"
usr.guildowner=4
else
M.guildtitle="Member"
M.guildowner=4
members++
proc/Remove(mob/M)
if(M.guild == src)
M.guild = null
players -= M.name
players << "[M.name] leaves the guild."
M << "You [(players.len)?"leave":"disband"] [name]."
if(!players.len)
del(src)
Guild_Say(msg as text)
for(var/M in usr.guild.players)
for(var/mob/N in Players)
if(N.name==M)
N<<"[usr.guildtitle]--[usr]: [msg]"
Assuming that you're using the automatic safe system, maybe the use of tmp could ease your trouble with saving referenced objects?
That is without reading your code.