var/list/HTML_TAGS = list ("<",">")
mob/proc/Check_For_Tags(T as text,var/list/L)
for(var/V in L)
if(findtext(T,V))
return TRUE
world
mob = /mob/game/
turf = /turf/
name = "Inuyasha Jewel of Four Souls"
client
proc
Load()
var/savefile/load
load = new ("Save Files/[src.mob.ckey]")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
Save()
var/savefile/save
save = new ("Save Files/[src.mob.ckey]")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
New()
..()
world << "[mob] has entered."
Del()
world << "[mob] has left."
src.mob.client.Save()
del src.mob
mob/game
Login()
var/list/L = newlist()
if(fexists("Save Files/[src.client.ckey]"))
L.Add(SUPER_NEW,SUPER_LOAD,SUPER_QUIT)
var/menu = input("Character File Found.","[world.name]") in L
switch(menu)
if(SUPER_NEW)
Create()
if(SUPER_LOAD)
src.client.Load()
if(SUPER_QUIT)
del(src)
else
L.Add(SUPER_NEW,SUPER_QUIT)
var/newmenu = input("Character File Not Found.","[world.name], \"New Player\"") in L
switch(newmenu)
if(SUPER_NEW)
Create()
if(SUPER_QUIT)
del(src)
..()
proc
Create()
var/mob/mobcreation
var/newname = input("Pick Character Name","Name",src.key)
if(lentext(newname) > 20)
src << "Your name can not exceed 20 characters."
Create()
if(isnull(newname) | newname == "" | !newname)
src << "Your name may not be of null."
Create()
if(Check_For_Tags(newname,HTML_TAGS) == TRUE)
src << "Your name may not have tags of html in them."
Create()
else
newname = html_encode(newname)
var/races = input("What race are you?","Race") in list ("Inuyasha","Kagome")
switch(races)
if("Inuyasha")
mobcreation = new/mob/Inuyasha()
mobcreation.race = "Inuyasha"
if("Kagome")
mobcreation = new/mob/Kagome()
mobcreation.race = "Kagome"
mobcreation.loc = locate(1,1,1)
mobcreation.name = newname
src.client.mob = mobcreation
del(src)
mob
var
race = "" as text
Stat()
statpanel("[name]")
stat("Race: [race]")
stat("Mob Type: [type]")
statpanel("Inventory")
stat(contents)
Inuyasha
icon = 'Inuyasha.dmi'
verb
Snow_Man_Verb()
world << "[src] Kagome ill save u!."
Kagome
icon = 'Kagome.dmi'
verb
Donut_Verb()
world << "[src] Inuyasha Help!."
:runtime error: Cannot read null.address
proc name: Login (/mob/Login)
usr: Sesshomaru XX (/mob/game)
src: Sesshomaru XX (/mob/game)
call stack:
Sesshomaru XX (/mob/game): Login() ok this only happens when i try to load a character... plz help
To help, could you put #define DEBUG in your code so the runtime errors would be more specific?