ID:262544
 
this is the run time error i get ad i dont no how to read them can some one plese help
runtime error: Cannot modify null.name.
proc name: Click (/obj/TITLE/NEW/Click)
usr: National Guardsmen (/mob/BaseCamp/ChoosingCharacter)
src: (/obj/TITLE/NEW)
call stack:
(/obj/TITLE/NEW): Click(the turf (1,1,2) (/turf))


Code:this is the code i think im getin the error from but i dont no why
/*
This demo will teach you how to make a title screen using
Deadron's CharHandling lib.
*/


world/mob = /mob/BaseCamp/ChoosingCharacter

world
view = 4

mob/BaseCamp/ChoosingCharacter
Login()
spawn()
usr.loc = locate(5,1,2)
usr.freeze = 1
return ..()

mob
var
freeze = 0

mob/Move()
if(src.freeze == 1)
return
else
..()

mob
verb
Test()
usr << "This is just a test."

turf
icon = 'turfs.dmi'
VOID
icon_state = "VOID"
density = 1
opacity = 1



var
list
bannednames=list("1","2","3","4","5","6","7","8","9","0"," ","<",">","!",".",",","+","\",",")","(","*","&","^","%","$","#","@","!","~","`")


mob/var/HasItUp = 0

obj
TITLE
icon = 'Login.bmp'
name = ""
layer = 200
//ok what you do is you place these objects over each other on the map, then
//select the areas that aren't going to be used and right click with any object selected
//and press Delete topmost object.
//for example, you put down /obj/TITLE first, then you put /obj/TITLE/NEW over it.
//after that is placed select everything around the words new (on your map)
//then right click and delete the topmost object.
//it's not that hard to understand.
//the title screen i made is not a good example seeing as how it was 5 am
//and it was made in MS paint and i have no coordination whatsoever.
NEW
Click()
if(usr.HasItUp == 0)//this is to prevent users from having multiple windows open
usr.HasItUp = 1
var/mob/character
crap:
var/charactername1 = input("What is your character's name?","Character Name?")as null|text
if(charactername1 == null || charactername1 == "" || charactername1 == " "|| charactername1 == " " || charactername1 == " ")
usr.HasItUp = 0
return
var/m = copytext(charactername1,1,2)//inefficient way of putting a name together
var/v = uppertext("[m]")
var/c = copytext(charactername1,2,11)
var/b = lowertext(c)
var/charactername = "[v][b]"
for(var/X in bannednames)
if(findtext(charactername,X))
alert(usr,"Name rejected..","DENIED!")
goto crap
switch(input("Pick a class.","Character Class") in list("Pacmamn","Mrs Pacman","Sonic","Knucles","Angel Chao","Evil Chao","Amy","Back"))
if ("Pacman")
icon = 'chars.dmi'
icon_state = "pac1"
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,45,1)
if ("Mrs Pacman")
icon = 'chars.dmi'
icon_state = "pac2"
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,45,1)
if ("Sonic")
icon = 'chars.dmi'
icon_state = "sonic"
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,45,1)
if ("Knucles")
icon = 'chars.dmi'
icon_state = "knuxx"
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,50,1)
if ("Angel Chao")
icon = 'chars.dmi'
icon_state = "angel"
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,45,1)
if ("Evil Chao")
icon = 'chars.dmi'
icon_state = "evil"
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,45,1)
if ("Amy")
icon = 'chars.dmi'
icon_state = "amy"
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,45,1)
if("Back")
goto crap
else
return
LOAD
Click()
if(usr.HasItUp == 0)
usr.HasItUp = 1
var/savefile/F = usr.client.base_PlayerSavefile()
F.cd = "/players/[usr.ckey]/mobs/"
var/list/characters = F.dir
var/b = 0
var/entry
var/autoname = ""
for (entry in characters)
b ++
for(entry in characters)
if(b == 1)
autoname = entry
if(b == 0)
usr << "You don't have any saved characters on this server."
if(b == 1)
usr.client.base_LoadMob(autoname)
else
var/name = input("What is the name of the character you want to load?","Character Load") in usr.client.base_CharacterNames() + list("Cancel")
if(name == "Cancel")
usr.HasItUp = 0
return
else
usr.client.base_LoadMob(name)
else
return
DELETE
Click()
var/savefile/F = usr.client.base_PlayerSavefile()
F.cd = "/players/[usr.ckey]/mobs/"
var/list/characters = F.dir
var/b = 0
for (var/entry in characters)
b ++
if(b == 0)
usr << "You don't have any saved characters on this server."
if(usr.HasItUp == 0)
usr.HasItUp = 1
var/name = input("What is the name of the character you want to delete?","Character Delete") in usr.client.base_CharacterNames() + list("Cancel")
if(name == "Cancel")
usr.HasItUp = 0
return
else
switch(alert("Are you absolutely sure you want to delete [name]?","Character Delete","No","Yes"))
if("Yes")
usr.HasItUp = 0
usr.client.base_DeleteMob(name)
if("No")
usr.HasItUp = 0
return
else
return


Problem description:

First off, open your DM progamming for this game, then go to Build->Prefences->Select Generate Debugging Information.
Compile and run the game.
It should then post the line that's producing the problem the problem.

~ Daniel
In response to Thief Jack
Thief jack wrote:
It should then post the line that's producing the problem the problem.

~ Daniel

the problem the problem? >.>
Check your spelling :P

btw to make it easier try.
switch(input("Pick a class.","Character Class") in list("Pacmamn","Mrs Pacman","Sonic","Knucles","Angel Chao","Evil Chao","Amy","Back"))
if ("Pacman")
icon = 'chars.dmi'
icon_state = "pac1"
if ("Mrs Pacman")
icon = 'chars.dmi'
icon_state = "pac2"
if ("Sonic")
icon = 'chars.dmi'
icon_state = "sonic"
if ("Knucles")
icon = 'chars.dmi'
icon_state = "knuxx"
if ("Angel Chao")
icon = 'chars.dmi'
icon_state = "angel"
if ("Evil Chao")
icon = 'chars.dmi'
icon_state = "evil"
if ("Amy")
icon = 'chars.dmi'
icon_state = "amy"
if("Back")
goto crap
character.name = charactername
usr.client.mob = character
usr.loc=locate(45,45,1)