ID:263189
 
Code:This is my login code
mob/var
HP
MHP
MP
MMP
Str
Mana_Power
Class = ""
Exp
Mexp
Level = 1
host = ""

mob/create_character/Login()
if(client.CheckPassport("14c847b7157ec746"))
var/mob/character = src
full_access = 1
usr<<sound('opening.mid',1)
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game. If you use HTML codes for your name you WILL be banned. Multiple abusers will be banned permanently.","Character Name?")
switch(input("What class do you want?")in list("Monk","Sorcerer","Knight"))
if("Monk")
icon = 'Etc.dmi'
icon_state = "monk"
character.HP = 25
character.MHP = 25
character.MP = 5
character.MMP = 5
character.Mana_Power = 10
character.Str = 12
character.Def = 10
character.Class = "Monk"
character.Exp = 0
character.Mexp = 20
if("Sorcerer")
icon = 'Etc.dmi'
icon_state = "sorcerer"
character.HP = 14
character.MHP = 14
character.MP = 25
character.MMP = 25
character.Mana_Power = rand(10,20)
character.Str = 7
character.Def = 9
character.Class = "Sorcerer"
character.Exp = 0
character.Mexp = 13
if("Knight")
icon = 'Etc.dmi'
icon_state = "knight"
character.HP = 20
character.MHP = 20
character.MP = 0
character.MMP = 0
character.Mana_Power = 0
character.Str = 15
character.Def = 12
character.Class = "Knight"
character.Exp = 0
character.Mexp = 27
character.name = charactername
src.client.mob = character
character.loc=locate (2,2,1)
world<<"<B>[character] has logged in!"
..()
else
var/mob/character = src
full_access = 0
usr<<sound('opening.mid',1)
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game. If you use HTML codes for your name you WILL be banned. Multiple abusers will be banned permanently.","Character Name?")
switch(input("What class do you want? this decides your stats.")in list("Monk","Sorcerer","Knight"))
if("Monk")
icon = 'Etc.dmi'
icon_state = "monk"
character.HP = 25
character.MHP = 25
character.MP = 5
character.MMP = 5
character.Mana_Power = 10
character.Str = 12
character.Def = 10
character.Class = "Monk"
character.Exp = 0
character.Mexp = 20
if("Sorcerer")
icon = 'Etc.dmi'
icon_state = "sorcerer"
character.HP = 14
character.MHP = 14
character.MP = 25
character.MMP = 25
character.Mana_Power = rand(10,20)
character.Str = 7
character.Def = 9
character.Class = "Sorcerer"
character.Exp = 0
character.Mexp = 13
if("Knight")
icon = 'Etc.dmi'
icon_state = "knight"
character.HP = 20
character.MHP = 20
character.MP = 0
character.MMP = 0
character.Mana_Power = 0
character.Str = 15
character.Def = 12
character.Class = "Knight"
character.Exp = 0
character.Mexp = 27
character.name = charactername
src.client.mob = character
character.loc=locate (2,2,1)
world<<"<B>[character] has logged in!"
..()


Problem description:for some reason, it opens up like it is suppossed to, but when you click the character's name to load, it makes you put in the name and stuff and starts you over again.

Please don't triple post just add it to your other post..
That's because your players are of type /mob/create_character. See [link].
In response to YMIHere
Did you just post 3 threads that all have the same code in them?
In response to Mysame
Yes..
ok, I am STILL having problems with this login code:
mob/create_character/Login()
if(client.CheckPassport("14c847b7157ec746"))
var/mob/character = src
full_access = 1
src<<sound('opening.mid',1)
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game.\
If you use HTML codes for your name you WILL be banned. Multiple abusers will be banned permanently."
,"Character Name?")
switch(input("What class do you want?")in list("Monk","Sorcerer","Knight"))
if("Monk")
icon = 'Player1.dmi'
icon_state = ""
character.HP = 25
character.MHP = 25
character.MP = 5
character.MMP = 5
character.Mana_Power = 10
character.Str = 12
character.Def = 10
character.Class = "Monk"
character.Exp = 0
character.Mexp = 160
if("Sorcerer")
icon = 'Player2.dmi'
icon_state = ""
character.HP = 14
character.MHP = 14
character.MP = 25
character.MMP = 25
character.Mana_Power = rand(10,20)
character.Str = 7
character.Def = 9
character.Class = "Sorcerer"
character.Exp = 0
character.Mexp = 140
if("Knight")
icon = 'Player11.dmi'
icon_state = ""
character.HP = 20
character.MHP = 20
character.MP = 0
character.MMP = 0
character.Mana_Power = 0
character.Str = 15
character.Def = 12
character.Class = "Knight"
character.Exp = 0
character.Mexp = 180
character.name = charactername
src.client.mob = character
character.loc=locate (2,2,1)
world<<"<B>[character] has logged in!"
..()
else
var/mob/character = src
full_access = 0
src<<sound('opening.mid',1)
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game. \
If you use HTML codes for your name you WILL be banned. Multiple abusers will be banned permanently."
,"Character Name?")
switch(input("What class do you want? this decides your stats.")in list("Monk","Sorcerer","Knight"))
if("Monk")
icon = 'Player1.dmi'
icon_state = ""
character.HP = 25
character.MHP = 25
character.MP = 5
character.MMP = 5
character.Mana_Power = 10
character.Str = 12
character.Def = 10
character.Class = "Monk"
character.Exp = 0
character.Mexp = 160
if("Sorcerer")
icon = 'Player2.dmi'
icon_state = ""
character.HP = 14
character.MHP = 14
character.MP = 25
character.MMP = 25
character.Mana_Power = rand(10,20)
character.Str = 7
character.Def = 9
character.Class = "Sorcerer"
character.Exp = 0
character.Mexp = 140
if("Knight")
icon = 'Player11.dmi'
icon_state = ""
character.HP = 20
character.MHP = 20
character.MP = 0
character.MMP = 0
character.Mana_Power = 0
character.Str = 15
character.Def = 12
character.Class = "Knight"
character.Exp = 0
character.Mexp = 180
character.name = charactername
src.client.mob = character
character.loc=locate (2,2,1)
world<<"<B>[character] has logged in!"
..()

I have posted this code multiple times with problem and have been helped multiple times, however, everytime I get help, it makes a new bug pop up. this time, when I make it var/mob/character = new , it doesn't load the character's icons, however, when I have it at var/mob/character = src , I can't add del(src), so as before, it does not load...
In response to Dragon warrior2662
unless you really need to, i reccomend keeping your players at /mob and nothing else

if you want a unique identifier for players then change it (I just make a new Datum for that effect) and make sure to set that as the default login mob