|
Ok this is weird i copyed my script and saved under something else and then messed with it I don't know what I did but now I am back to haveing only one error but i still can't figure it out I'll post it here I need this to work it is important. Thank you.
mob
Login()
switch(input("Would you like to Load a saved game or start a new one?") in list("New Game", "Load Game", "Exit"))
if("New Game")
src.ChooseCharacter()
if("Load Game")
src.Load()
if("Cancel")
src.Logout()
proc/ChooseCharacter()
src.name = input("What would you like your name to be?","Name input")
switch(input("Choose a class.") in list("Archer","Warrior"))
if("Archer")
icon = 'Long Range People.dmi'
icon_state = "archer"
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] has joined Acacial Prodegy."
loc = locate(1,1,1)
Save()
if("Warrior")
icon = 'Warrior.dmi'
icon_state = "Warrior"
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] has joined Acacial Prodegy."
loc = locate(1,1,1)
Save()
proc/Load()
var/savefile/F = new("saves/[src.key].sav")
cansave = 1
Read(F)
var/lx,ly,lz
F["last_x"] >> lx
F["last_z"] >> lz
loc = locate(lx,ly,lz)
world << "<small><font color = red><b>Login info: <font color = black>[src]/[key] has logged into Acacial Prodegy."
Save()
proc/Save()
var/savefile/F = new("saves/[src.key].sav")
Write(F)
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z
src << "<small><font color = red><b>Save info: <font color = black>Your game has been saved"
sleep(900)
Save()
..()
Logout()
if(cansave)
Save()
world << "<small><font color = red><b>[src] has left Acacial Prodegy."
..()
del(src)
|