ID:176430
 
1. How do I get it so the host don't get told errors like the one shown in number 2

2. How come when I use for(M in world) in a verb or proc or anything, I always get something like this:

runtime error: undefined variable /area/var/isperson
proc name: Who (/mob/commands/verb/Who)
usr: MartialArtistAbu the Ham-Ham (/mob)
src: MartialArtistAbu the Ham-Ham (/mob)
call stack:
MartialArtistAbu the Ham-Ham (/mob): Who()
post the who verb, at a guess I presume that you have not defined the Var isperson. Or maybe you spelt if with caps?
In response to Maz
oh I defined it..

Who()
set category = "Chat Commands"
for(M in world)
if(M:isperson == 1)
usr << "[M:name]([M:ham]'s Ham) Key: [M:key]"
else


and of course I have another DM that defines all the variables

atom/movable
var
fInitial
fBattle
fMax
eInitial
eBattle
eMax
turf
iiname
iname
fusedname
move
fused
fusedwith
password
iicon
gm
abu
loggedin
place
M
bed
isperson
cicon
cicon1
cname
ciconstate
sky
enter
saveicon
creation
enter2
file
title
titleB
commentsB
loca
UsedEvil
status
RPname
ham
messaged
Seeds
heck
maxHP
HP
pk
dietimes
eating
accept
haveham
initialHP
mute
rank
wait
pkroom
words
hasplayer
energy
fun
room
bladder
hunger
comfort
social
neat
nice
outgoing
active
playful
like
crush
dislike
genderrr
lazy
hwahwa
hwa
description
ball
ballwho
tagg
tagwho
tag2
reason
whyrea
sorry
MP
initialMP
maxMP
blahicon
blahstate
q
w
e
host
str
def
exp
expnext
level
havetele
haveinstele



and I get that runtime error when I tried for(M in world) with something else, also
In response to MartialArtistAbu
You never defined M as a mob, or even an atom/movable. Thus, DM doesn't know isperson is a valid var for it.

Lummox JR
In response to Lummox JR
yes it is, look in the var list.. M is there.. that what ya mean?
In response to MartialArtistAbu
MartialArtistAbu wrote:
yes it is, look in the var list.. M is there.. that what ya mean?

I said you didn't define M as anything; it's just a var with no type whatsoever. DM doesn't know it's supposed to be a mob, or at least an atom/movable, because you didn't define it as one.

Furthermore, why is this an atom var and not a local var defined right within the proc as var/mob/M? Given the preponderance of vars you've given to atom/movable, it looks to me as if you're defining all your vars on a per-object basis, not locally when it's appropriate.

Lummox JR