ID:155977
 
Well i want to know if i need to make a savefile of the names ppl choose so that when someone else wants to put that name they can't...
If i need to, please help me dont know how to make a savefile.

Thanks
The method I would use is to save them to a list, which is saved and loaded when the world closes and opens. When a player wants a name, check the list and give it to them if it's not there, and add it to the list.
In response to Pirion
how to make a list? using variables?
In response to Vynder
Vynder wrote:
how to make a list? using variables?

var/list/nameoflist = list()


or if a mob list

mob/var/list/nameoflist = list()
In response to Pirion
okay i made the list and i did something like
var/list/L = list()
but how to add the name that the person wanted..
i tried something like:
var/list/L[100000]
usr.name = winget(usr,"window.inputname","text")
if(usr.name == L)
winshow(src,"namealreadytaken",1)
return
L += src.name
In response to Hashir
okay i made the list and i did something like
var/list/L[100000]
but how to add the name that the person wanted..
i tried something like:
var/list/L[100000]
usr.name = winget(usr,"window.inputname","text")
if(usr.name == L)
winshow(src,"namealreadytaken",1)
return
L += src.name
In response to Vynder
Vynder wrote:
okay i made the list and i did something like
var/list/L[100000]
but how to add the name that the person wanted..
i tried something like:
var/list/L[100000]
usr.name = winget(usr,"window.inputname","text")
if(usr.name == L)
winshow(src,"namealreadytaken",1)
return
L += src.name

You just have to modify the list var and add the names of objects or the person you want: e.g:

If you have a ban list and you want someone to be banned permanant from the game you can do as:

var/list/Bans = list("Hashir") // commas to seperate


And if you want to add the name of person or an obj using a verb during game you will just use nameoflist+=blabla.

Hope it helped.
In response to Hashir
Simpler solution: Save the files according to ckey, load them according to ckey.