I was using browser forms to do character creation, but have descided to change to a series of input codes.
The problem is that when the CharacterCreation() proc is called at login, there is all this savegame stuff going on, the proc is called from a set of code that creates a list of your saved cahracters and shows them on a list, with an extra option to create a new character at the bottom.
It seems that at this point, usr is null, and I get this wierd error.
///////////////////////////////////////////////////////////
//Proc called at login to make a list of saved characters//
///////////////////////////////////////////////////////////
client
proc
ChooseCharacter()
var/savefile/F = new("players.sav")
F.cd = "/[ckey]"
var/list/characters = F.dir
var/newCharacterChoice = ""
var/list/menu = new()
if (length(characters))
menu += characters
menu += newCharacterChoice
var/result = input(mob, "Choose a Pilot or create a new one", "Roster", null) in menu
if(result == newCharacterChoice)
mob.CreateCharacter()
//he CreateCharacter() proc called at the end there//
mob/proc
CreateCharacter()
name = input("Enter Your Name","Create Pilot",null)
/////////////
//THE ERROR//
/////////////
runtime error: bad client
proc name: CreateCharacter (/mob/proc/CreateCharacter)
source file: Main.dm,186
usr: null
src: Mloren (/mob)
call stack:
Mloren (/mob): CreateCharacter()
Mloren (/client): ChooseCharacter()
Mloren (/client): New()
///////////////
I dont understand whats wrong here...
whats with the "bad client" error???
ID:178501
May 3 2002, 3:08 am
|
|