I was trying to get overlays to save when you logout, be removed then be put back on but, whenever i login, my overlays dont get put back on.
I would appreciate help on this problem.
mob/var/list/oldoverlays.
PlayersandMonsters
parent_type = /mob/
Login()
usr.overlays += usr.oldoverlays
..()
client
Del()
world << "Removing overs"
usr.oldoverlays+=usr.overlays
usr.overlays=null
ID:148295
![]() Apr 19 2003, 11:04 pm
|
|
Unknown Person wrote:
Maybe you should do this for the client/Del()... > client ~~Dragon Lord~~ Um, that doesnt work, it gives me un-defined for all the vars there. |
Fisrt of all, what is the point of displaying to the whole world that one persons overlays are being removed. Second, (as far as I know), usr is associated with the MOB. Use src instead. Third, here's what I think the code should look like:
client/Del() |
Hazman wrote:
Fisrt of all, what is the point of displaying to the whole world that one persons overlays are being removed. Second, (as far as I know), usr is associated with the MOB. Use src instead. Third, here's what I think the code should look like: client/Del() The only point i had it going to world, is to test if they actually do get removed, and now im getting Type Mismatches. Ill show you my full code, the version i gave you had a bit taken out. PlayersandMonsters parent_type = /mob/ Login() for(var/a in usr.oldoverlays) //Don't set the var to the list, but what's IN the list usr.overlays += a ..() realplayer Login() return client/Del() src << "Removing your overlays" for(var/a in mob.overlays) //Don't set the var to the list, but what's IN the list mob.oldoverlays += a//TYPE MISTMATCH mob.overlays-=mob.overlays if(istype(usr,/PlayersandMonsters/realplayer)) save() return .=..() |
~~Dragon Lord~~