mob
verb say,(msg)
worldsay "msg to world"[msg]
mob/player/Login()
var/savefile/F = new("players.sav")
// What characters does this player have?
F.cd = "/[ckey]"
var/list/characters = F.dir
// Put together the menu options.
var/newCharacterChoice = ""
var/list/menu = new()
menu += characters
menu += newCharacterChoice
// Find out which character they want to play.
var/result = prompt("Who do you want to be today?", null, "Choose a character or create a new one") in menu
if (result == newCharacterChoice)
name = CreateNewCharacter()
else
// We need to get the full name for this character,
// which is stored in the safefile at '/player_ckey/character_ckey/full_name'.
F.cd = "/[ckey]/[result]"
F["full_name"] >> name
return ..()
mob/player/DeleteCharacter()
// You might want to add a cancel option in here somewhere, and a deletion confirmation...
var/savefile/F = new("players.sav")
// What characters does this player have?
F.cd = "/[ckey]"
var/list/characters = F.dir
// Put together the menu options.
var/list/menu = new()
menu += characters
// Find out which character they want to delete.
var/result = prompt("DELETING a character", null, "Which character do you want to delete?") in menu
if (result)
F.cd = "/[ckey]"
F.dir.Remove(result)
mob
var/tmp/player/MyPlayer // This is not auto-saved, because it is declared as tmp.
Write(savefile/F)
// Let auto-save do its thing first.
..()
// Now save the player object where it belongs.
F["/players/[ckey]"] << MyPlayer
return
Read(savefile/F)
// Let auto-save stuff read in the rest of the mob first.
..()
// Now get the player object.
F["/players/[ckey]"] >> MyPlayer
return
mob/verb/multicon(factor as num)
icon *= factor
thats for wsay say and save so would this make a diffence if they are on the same code page
</<>
ID:146370
Jul 7 2005, 5:08 pm
|
|
Jul 7 2005, 5:22 pm
|
|
no not really most coders seperate that way so they know where they put it at but you can do that if it's better for you to find it
|
What does matter is whther or not you wrote these "codes". I suspect you haven't. Please learn to program, don't just throw together a set of unrelated pieces of text and expect it to work.
|
In response to Jp
|
|
....i highly doubt you wrote that save system it has quotes, and yea, please try and LEARN from the demos not compile them all with ripped code into a game that is dumb
|
In response to Jp
|
|
um the dm coding guid taught me how to make it im a amuture coder
|