ID:147444
 
Can someone tell me how to fix this runtime error?
runtime error: bad client
proc name: ChooseCharacter (/mob/other/Choose/proc/ChooseCharacter)
source file: Login.dm,93
usr: Kanak (/mob/other/Choose)
src: Kanak (/mob/other/Choose)
call stack:
Kanak (/mob/other/Choose): ChooseCharacter()
Kanak (/mob/other/Choose): ChooseCharacter(Kanak (/mob/other/Choose))
Load an old player (11,145,2) (/turf/C_Creation/Load_Character): Click(Load an old player (11,145,2) (/turf/C_Creation/Load_Character))

Heres the CC proc:
mob
proc
ChooseCharacter()
var/list/characters = src.CharacterList()
var/newCharacterChoice = "New Character"
var/DeleteCharacterChoice = "Delete Character"
var/list/menu = new()
menu += characters
menu += newCharacterChoice
menu += DeleteCharacterChoice

var/result = input("Character Creation", "Dragonball Zen") in menu

if (result == newCharacterChoice)
src.CreateNewCharacter()
if (result == DeleteCharacterChoice)
src.DeleteCharacter()
src.ChooseCharacter()
else
var/success = src.client.LoadMob(result)

if (success)
del(src)
else
alert("I like cheese..")
src.ChooseCharacter()



Line 93 is :
var/result = input("Character Creation", "DragonBall Zen") in menu
Your problem is that input(), by default, has usr in it.
var/result = input("Character Creation", "Dragonball Zen") in menu is really var/result = input(usr, "Character Creation", "Dragonball Zen") in menu

Since this is a proc, and usr is invalid, you need to replace it with something else. src looks like it will work fine in this case.
In response to Jon88
Thank you.
In response to Jon88
it still doesn't work i put in:
var/result = input(src, "Character Creation", "Dragonball Zen") in menu