ID:141593
 
Code:
mob
Login()
src.client.view=6
xD
switch(input("New game or load?") in list ("New","Load"))
if("Load")
if(fexists("Player Saves/[src.ckey].sav"))
src.client.Load()
world<<"[src] has logged in"
src.verbs+=typesof(/mob/verb)
else
src << "There is no save file, you gotta start from scratch,sorry"
goto xD
if("New")
switch(input("pokemon or trainer?") in list ("trainer","pokemon"))
if("trainer")
switch(input("what gender?") in list ("male","female"))
if("male")
icon = 'ash.dmi'
icon_state = "stand"
type1 = "Trainer"
gender1 = "Male"
usr.land_type = "Land"
usr.element = "Human"
usr.Move(locate(1,1,1))
if("female")
icon = 'person.dmi'
icon_state = "female"
type1 = "Trainer"
gender1 = "Female"
usr.land_type = "Land"
usr.element = "Human"
usr.Move(locate(1,1,1))
if("pokemon")
switch(input("what gender?") in list ("male","female"))
if("male")
icon = 'Aura of birth.dmi'
icon_state = "stand"
gender1 = "Male"
type1 = "Pokemon"
usr.Move(locate(41,1,3))
if("female")
icon = 'Aura of birth.dmi'
icon_state = "stand"
gender1 = "Female"
type1 = "Pokemon"
usr.Move(locate(41,1,3))


Problem description:The problem is that whenever i press Load it loads my game but the window where i have to choose "New" or "Load" appears again, i can move it off screen it will work but i want to get rid of it >.<

You should turn you're Loading and Saving into a proc, and instead of using Move() to move the characters locations, why not use; usr.loc=locate(1,1,1)
In response to Gizhy
Gizhy wrote:
instead of using Move() to move the characters locations, why not use; usr.loc=locate(1,1,1)

Do not take this piece of advice. Move() is there for a reason.
In response to Alathon
Lol, dude do you just follow all my posts to correct me lmao, how pathetic.
In response to Gizhy
Gizhy wrote:
Lol, dude do you just follow all my posts to correct me lmao, how pathetic.

I don't follow you around at all. You just happen to be posting really bad advice, again and again. Do you see a pattern there?

Please don't flame on these forums.
In response to Alathon
client
proc
Save()
if(!src)return
if(!src.mob)return
var/savefile/save
save = new ("Player Saves/[mob.ckey].sav")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
Load()
var/savefile/load
load = new ("Player Saves/[mob.ckey].sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z


I already made them a proc in a different dm. file but loading/saving is not the problem...the problem is that it constanty shows the "New" or "Load" screen no matter how many times i press "load" (it loads my game but the window appears again) and it wont dissapear untill i press "New"
In response to Destrojer
Ok,i figured what the problem is...it's when it loads it goes back to login....but where do I place the New/Load thingy then?
In response to Destrojer
Define a specific path in the creation procedure for the "ghost" mob, ex: mob/Ghost (and prob. set through world/mob so that the default login mob is set as mob/Ghost) and have the player path different from that path (ex: /mob, /mob/Trainer, etc)

Then define that Login() for mob/Ghost/Login().

Another method would be to have a unique identifier letting you know if a person logged in or not, ex:
mob/var/trainer_number = 0

mob/Login()
if(trainer_number)
world << {"This person does not have 0, null, "" for their trainer_number variable, which means this char has been created!"}

Created()
trainer_number=rand()