In response to Lummox JR
Okay, it isn't "src.loc.type" because I did this:

deathcheck(var/mob/M) //check to see if your heart still pumps
if(M.HP<=0) //if it is dead continue doing the stuff in here
sleep(5) //sleep 1.5 seconds
if(istype(M,/mob/Monsters)) //if it is a monster that is being checked
if(src.God=="Inchu")
src.InchuXP+=M.XPGive
else if(src.God=="Malus")
src.MalusXP+=M.XPGive
else if(src.God=="Nalan")
src.NalanXP+=M.XPGive
else if(src.God=="Taet")
src.TaetXP+=M.XPGive
else if(src.God=="Putesh")
src.PuteshXP+=M.XPGive
else if(src.God=="Kaif")
src.KaifXP+=M.XPGive
else if(src.God=="Xu")
src.XuXP+=M.XPGive
else if(src.God=="Chra")
src.ChraXP+=M.XPGive
else if(src.God=="Raj")
src.RajXP+=M.XPGive
else if(src.God=="Eudia")
src.EudiaXP+=M.XPGive
else if(src.God=="Gebor")
src.GeborXP+=M.XPGive
else if(src.God=="Nauti")
src.NautiXP+=M.XPGive
else if(src.God=="Turas")
src.TurasXP+=M.XPGive
else if(src.God=="Alz")
src.AlzXP+=M.XPGive
else if(src.God=="Aul")
src.AulXP+=M.XPGive
else if(src.God=="Uulong")
src.UulongXP+=M.XPGive
//var/C = "[src.God]XP"
//C+=M.XPGive//add it to your exp
src<<"[M] is defeated!" //let yourself know you killed it
sleep(7) //sleep 1.5 seconds to let it sink in
src<<"M = [M]"
src<<"src = [src]"
src<<"You gain [M.XPGive] experience points!" //let yourself know you got some exp
del M //delete the monster, cause it is dead
src.LevelUp() //check to see if you leveled up
else //else, if it is a PC
src<<"You have died." //tell them they died
src.HP=src.MaxHP //restore hp
//var/B = "[src.loc.type]"
//var/C = copytext(B,1,9)
//var/D = "[C]TO"
//src.loc = locate(D)
src<<"usr = [usr]"
src<<"M = [M]"
src<<"src = [src]"
src<<"src.loc = [src.loc.type]"


So that "src.loc.type" isn't used, and I still got exactly the same error. The:

src<<"usr = [usr]"
src<<"M = [M]"
src<<"src = [src]"
src<<"src.loc = [src.loc.type]"

is just for testing.

Secondly, I have changed usr to src in proc, thanks!

And thirdly, I did look up "vars[] list" in the F1 help, and what I found didn't really help me. Mainly because it wasn't exactly "vars[] list" and also because I didn't completely understand it.

~Ease~
In response to Ease
Well, it's not called the vars[] list in the help. It's called "vars list var (datum)". Basically, the list contains the variable names of an object's variables.
Say you have code similar to the following:
mob
var
hp = 10
mp = 5
verb
ReadVar(varname as text)
src << "[varname] = [src.vars[varname]]"

You could access your mob's variables with the ReadVar verb. If you passed it "hp" you would get the message "hp = 10".
In response to Ease
Ease wrote:
Okay, it isn't "src.loc.type" because I did this:
//var/B = "[src.loc.type]"
//var/C = copytext(B,1,9)
//var/D = "[C]TO"
//src.loc = locate(D)
src<<"usr = [usr]"
src<<"M = [M]"
src<<"src = [src]"
src<<"src.loc = [src.loc.type]"

So that "src.loc.type" isn't used, and I still got exactly the same error.

Gee, you're still using the same problem expression and still getting the same error. Wonders never cease.

You're still using src.loc.type, only this time in a statement for output. And since src.loc is still null, you still get the same error.

The solution is to correctly handle situations where src.loc is null, and bypass any code using src.loc.type for those cases.

And thirdly, I did look up "vars[] list" in the F1 help, and what I found didn't really help me. Mainly because it wasn't exactly "vars[] list"...

Good gads, did you expect an exact name and link? Just search for "vars" in the reference index and skip past the entries that are just lists of which vars are used by atoms, datums, etc.

...and also because I didn't completely understand it.

Bingo!

This list allows you to do exactly what you were trying to do with the C="[God]XP" stuff. Read the entry again. And again and again and again.

Lummox JR
In response to Lummox JR
Thank you! I love you! I got it fixed! I found out that my src, was not who I thought my src was. In the end, all I had to do was change all of the "src"'s in that part, to "M"'s (I COULD have used usr's, but "no usr in proc, ungh")

Thank you again!

~Ease~
Page: 1 2