ID:151181
 
I making a teleport command that only DM can see this is what I got:

mob
if(IsDM(usr))
else usr << "You're not a DM!"
verb/teleport(mob/M as mob in world)
if(IsDM(usr)) usr.loc = M.loc


proc/IsDM(mob/myMob)
if(myMob.ckey == "Darkness") return 1
else usr << "You're not a DM!"

but there is 3 errors...please help
mob
if(IsDM(usr))
else usr << "You're not a DM!"
verb/teleport(mob/M as mob in world)
if(IsDM(usr)) usr.loc = M.loc

Keep proc/IsDm as is, but replace the above with:

mob
verb/teleport(mob/M as mob in world)
if(IsDM(usr)) usr.loc = M.loc
In response to Guy T.
Ok, now im haveing more trouble :(

Code:

mob/Avatar/verb
Teleport()
(mob/M as mob in world)//line 363
if(IsDM(usr)) usr.loc = M.loc//line 364

Errors:

Code.dm:363:error::missing ()'s or invalid return type
Code.dm:364:error:if :missing ()'s or invalid return type
Code.dm:364:error::missing ()'s or invalid return type




Thanx
Shane
In response to Shane
On 2/24/01 2:48 am Shane wrote:
Ok, now im haveing more trouble :(

Code:

mob/Avatar/verb
Teleport()
(mob/M as mob in world)//line 363
if(IsDM(usr)) usr.loc = M.loc//line 364

Errors:

Code.dm:363:error::missing ()'s or invalid return type
Code.dm:364:error:if :missing ()'s or invalid return type
Code.dm:364:error::missing ()'s or invalid return type

You're sure you can't find those errors yourself? They are quite obvious... mostly. =)

(I'll give you a hint... you have weird indentation, and something there is missing the word 'for'.)
In response to Spuzzum
Oh well then for get it im kinda new and cant notice errrors you you.
Thanx
Shane