ID:156270
Nov 21 2010, 3:20 pm
|
|
How would you remove a user's character name from a global list if the user isn't the same name as their character at the login screen?
|
In response to OrangeWeapons
|
|
I'll try, hopefully this isn't too confusing, maybe I'm just over thinking things.
-The player goes to a login screen as a mob type /mob/login -The player's name is his key at this point -The player clicks new to make new character -The player names their new character (the name is added to a global list which is saved/loaded on world/New() and Del()) and their mob type is switched to this character which is a /mob/character type. -When the player exits the game their character is saved in client/Del(). Now let's say a player was to delete their character how would I remove that character's name from the global list? |
In response to Onolt
|
|
Find the savefile attached to their key and take the character name from that.
|
In response to Warlord Fred
|
|
Is there a way to call out the file and its data without loading the character?
|
In response to Onolt
|
|
Put the data into a temporary variable.
|
In response to Warlord Fred
|
|
Like this?
var/list/nameList = new |
In response to Onolt
|
|
Exactly.
|
In response to Warlord Fred
|
|
When I try to print out the name to the user nothing shows up. Do you have to change the Write() and Read() procs to explicitly load and save the name?
proc/CharDel() |
In response to Onolt
|
|
The name should not be stored in F["name"]. Depending on how you store the character, it may be in F[".0/name"] or F["mob/.0/name"]. The easiest thing is to use ExportText() to view the savefile as text to see where the name is stored.
|
In response to Garthor
|
|
Thank you, It was saved under F[/mob/.0/name"]. Thank you everyone for all your help!
|
-player makes name
-name added to list
-player changes name
in a similar format?