ID:170853
 
This error probably isnt THAT wierd, but whats wierd about it is that it only happens on my main key, Loch, when I try to create a character on my OTHER keys, it works fine... Here is the error:

WORLD: Instance opened at approx. 16:08:57 12/06/2004.
WORLD: Key "Loch" connected for the 24th time at approx. 16:08:57 12/06/2004.
Setting network delay to 0.
runtime error: Cannot modify null.name.
proc name: CreateCharacter (/mob/creating_character/proc/CreateCharacter)
usr: Loch (/mob/creating_character)
src: Loch (/mob/creating_character)
call stack:
Loch (/mob/creating_character): CreateCharacter()
Loch (/mob/creating_character): Login()

Can you possibly tell me why this happens when I try to create a character?
X_x.
In response to Loch
You will have to post some sort of code to let us help you. Prefably around the line that was listed.
In response to N1ghtW1ng
Here is the entire createcharacter code, the problem should be around the CreateCharacter proc...
#include <deadron/characterhandling>
client
base_num_characters_allowed = 5
world
mob = /mob/creating_character
mob/base_save_location = 0
mob/creating_character
base_save_allowed = 0
Login()
spawn()
src.CreateCharacter()
proc/CreateCharacter()
var/prompt_title = "New Character"
var/help_text = "What do you want to name the character?"
var/default_value = key
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
char_name = html_encode(char_name)
if(length(char_name)>20)
char_name = null
alert("Names must be under 21 characters long.")
if (!char_name)
client.base_ChooseCharacter()
return
var/ckey_name = ckey(char_name)
var/list/characters = client.base_CharacterNames()
if (characters.Find(ckey_name))
alert("You already have a character named that! Please choose another name.")
src.CreateCharacter()
return
var/char_class
switch(src.key)
if("Loch")
char_class = "GM"
else
var/list/classes = list("Warrior","Wizard","Rogue","Monk")
help_text = "What class?"
default_value = "Warrior"
char_class = input(src, help_text, prompt_title, default_value) in classes
var/mob/new_mob
switch(char_class)
if ("Warrior")new_mob = new /mob/Classes/Warrior()
if ("Wizard")new_mob = new /mob/Classes/Wizard()
if ("Rogue")new_mob = new /mob/Classes/Rogue()
if ("Monk")new_mob = new /mob/Classes/Monk()
new_mob.name = char_name
src.client.mob = new_mob
var/turf/first_location = locate(/turf/Start)
new_mob.Move(first_location)
del(src)
mob
Login()
..()
Write(savefile/F)
..()
if (world.maxx)
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z
Read(savefile/F)
..()
if (world.maxx)
var/last_x
var/last_y
var/last_z
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)
mob/BaseCamp/ChoosingCharacter
DeleteCharacter()
var/list/available_char_names = client.base_CharacterNames()
var/list/menu = new()
menu += available_char_names

menu += BASE_MENU_CANCEL
menu += BASE_MENU_QUIT

// Let developer provide their own menu if they wish.
DeleteCharacterResult(DeleteCharacterMenu(menu))

DeleteCharacterMenu(list/menu)
// Given a list of menu options, display them and return the result.
var/default = null
return input(src, "Which character do you want to delete?", "Deleting character", default) in menu

DeleteCharacterResult(menu_choice)
// Respond to the option the player chose from the character deletion menu.
switch(menu_choice)
if (0, BASE_MENU_QUIT)
// Kick them off.
del(src)
return

if (BASE_MENU_CANCEL)
ChooseCharacter()
return

// They chose a character to delete.
client.base_DeleteMob(menu_choice)
ChooseCharacter()
return
In response to Loch
I bet you $5 that this is your problem:

            if("Loch")
char_class = "GM"


I don't know whats wrong with it, but if I remember correctly, you said it's only IF you try it under key: "Loch", so this looks like the problem.

[Edit's his own post]

Please do not quote an entire post as big as that without commenting on tons of different segments. Thank you,

--Lenox
In response to Lenox
I know the problem >_< I have 2 vars like that as GM :O