ID:261005
 
I am new to making games and Darkness has tried to teach me, i tryed to make a create and load menu when the game starts up but it says what is below when i compile (no errors or warning) and select run.

bad object
proc name: CreateNewCharacter (/mob/choosing_character/proc/CreateNewCharacter)
usr: null
src:
call stack:
CreateNewCharacter()
ChooseCharacter()
Login()

I think the problem is in:


mob/choosing_character/proc/CreateNewCharacter()


var/prompt_title = "New Character"
var/help_text = "Type a name"
var/default_value = key
var/char_name = input(src, prompt_title, default_value, help_text) as null|text
if (!char_name)

src.ChooseCharacter()
return

var/ckey_name = ckey(char_name)
var/list/characters = CharacterList()
if (characters.Find(ckey_name))
alert("You already have a character named that! Please choose another name.")
src.CreateNewCharacter()
return

var/list/races = list("Male Knight","Female Knight")
help_text = "Which race would you like to be?"
default_value = "Choose Your Gender"
var/char_race = input(src, prompt_title, default_value, help_text) in races



var/mob/new_mob
switch(char_race)
if ("Male Knight") new_mob = new /mob/Male_Human()
if ("Female Knight") new_mob = new /mob/Female_Human()
That happns if I select New character and then gender nad then done but if when i try to load a char I get a Blank screen.
In response to Seto-Strife
On 4/20/01 6:04 pm Seto-Strife wrote:
That happns if I select New character and then gender nad then done but if when i try to load a char I get a Blank screen.

Add the line

#define DEBUG

to the top of your .dm file, on its own line.

Then tell us what line is reported, and use Ctrl+G to highlight the line that gives you the error, and mark that line.

I.e.

bad object
(filename.dm, line 124)
usr: null
src: null
call stack:


And then in your code,

//yadda yadda yadda

usr.HP -= 2 //line 124

//yadda yadda yadda
In response to Spuzzum
Don't worry I fixed it without darknessess help... he tried but didn't know what to do...
In response to Spuzzum
it doesn't say there is a error tho. and ignore the msg thet says I fixed it...
In response to Seto-Strife
On 4/21/01 10:01 am Seto-Strife wrote:
Don't worry I fixed it without darknessess help... he tried but didn't know what to do...

you said the problem was ub the char saving.dm and I didn't see anything wrong with it...like I said...and spuzzum said..you needed to show more code to let us fix the problem.
In response to Darkness
you said the problem was ub the char saving.dm and I didn't see anything wrong with it...like I said...and spuzzum said..you needed to show more code to let us fix the problem.


Spazzum what is ur e-mail and i will send u the code... couse i have no idea what the problem is.