ID:144526
 
Code:
turf
Main_Screen
icon = 'titlescreen..bmp'
density = 1
layer = OBJ_LAYER + 2



Load
icon = 'Turf.dmi'
icon_state = "Load"
Click()
src.Load()


New
icon = 'Turf.dmi'
icon_state = "New"
Click()
src.ChooseCharacter()


mob/characters/Mage
icon = 'Characters.dmi'
icon_state = "male"
mob/characters/Dmage
icon= 'Characters.dmi'
icon_state = "male"






mob
Login()
loc = locate(8,7,5)//this is my titlescreen location

proc/ChooseCharacter()//This is the ChooseCharacter proc when it is called it will all the coding up below so a mob can create his/her character.
src.name = input("What would you like your name to be?","Name input")//Asks a mob what they want their name to be.
switch(input("What Race would you like to be?") in list("Mage","Dark Mage"))//A list asking what gender they want to be.
if("Dark Mage")//If the mob picks Male their mob is now a male
icon = 'Characters.dmi'//This becomes the mobs icons.
icon_state = "Male"//chooses the icon state of the mob so they dont become another gender.
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] is a first time player."//Says to the world that a mob has logged in for the first time.
loc = locate(1,1,1)//Plants the mob in this location
Save()//Calls the save proc so the user can load the next time they login.
if("Mage")//If the mob picks female their mob is now a female
icon = 'Characters.dmi'//This becomes the mobs icon.
icon_state = "Male"//Choose the icon state of the mob so they dont become the wrong gender.
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] is a first time player."//Says to the world that a mob has logged in for the first time.
loc = locate(1,1,1)//Puts the mob in this location.
Save()//Calls the save proc so the mob can load the next time they login.
proc/Load()//This is the Load proc so when a mob clicks load it gives them their old character.
var/savefile/F = new("saves/[src.key].sav")//Overwrites their last save file to show they logged in again.
cansave = 1//This a var show that the mob can save their game.
Read(F)//Read the mobs save file.
var/lx,ly,lz//vars to that we dont have to put last_x and so on making it much easier
F["last_x"] >> lx//This is a desplay of what i have done above. These means your last locations.
F["last_y"] >> ly
F["last_z"] >> lz
loc = locate(lx,ly,lz)//Puts the mob in their last location,
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] has logged into the world."//Show the world a mob has logged in with an old save file.
Save()//Calls the save proc so the mob can save.
proc/Save()//The Save proc is inuse when called.
var/savefile/F = new("saves/[src.key].sav")//Overwrites their file with another location now
Write(F)//Write over their save file
F["last_x"] << x//Writes over their last with their new one.
F["last_y"] << y
F["last_z"] << z
src << "<small><font color = red><b>Save info: <font color = black>Your game has been saved"//says to the mob their game has been save
sleep(900)//sleep for 1 minute and a half.
Save()//Calls the proc again so that it will save the mobs x,y,z.
..()//Calls the history.
Logout()//The logout proc which is inbuilt in dream maker but is always save to have
if(cansave)//if the mob can save save them also if you put !cansave it means the mob cant save so bare this in mind.
Save()//Call the save proc.
world << "<small><font color = red><b>[src] has logged out."//Tell the world a mob has logged out of the world
..()//Call all the histy before logging out
del(src)//Delete the mob from the world note their save file will not go lol.








var
cansave


Problem description:

C:\Documents and Settings\Misty\Application Data\BYOND\lib\deadron\characterhandling\implementation.dm:1 06:error:ChooseCharacter :duplicate definition
Login.dm:661:error:ChooseCharacter :previous definition
Login.dm:615:error:src.Load:undefined proc
Login.dm:622:error:src.ChooseCharacter:undefined proc

Oblivion.dmb - 4 errors, 0 warnings (double-click on an error to jump to it)
under all the files in the dm file list, open the lib folder and check off deadron.characterhandling.
In response to Rky_nick
what about the other errors i have i only have a few left now.
In response to Pyro170
and that didnt work i unchecked it but still same 4 errors
In response to Pyro170
Read the rrors carefully:
C:\Documents and Settings\Misty\Application Data\BYOND\lib\deadron\characterhandling\implementation.dm:1 06:error:ChooseCh aracter :duplicate definition
Login.dm:661:error:ChooseCharacter :previous definition

That is stating you are using the two same procs, one seems to be a lib file and another in your DMC file, uncheck/delete one of those two procs.


Login.dm:615:error:src.Load:undefined proc
Login.dm:622:error:src.ChooseCharacter:undefined proc

Those procs are not defined, meaning they don't exist.. make sure they exist and the type is correct (eg: if src == /mob but the proc is a client, than you have to call it via client as in src.client.proc())

- GhostAnime