here is my code
Get() //this allows all items to be picked up wth one verb
if(istype(/mob/Priest))
usr << "Cant do that"
if(istype(/mob/Soldier))
usr << "Cant do that"
if(istype(/mob/GM))
usr << "Cant do that"
if(istype(/mob/Thief))
usr << "Cant do that"
if(istype(/mob/Warior))
usr << "Cant do that"
if(istype(/mob/Wngdmn))
usr << "Cant do that"
else
set category="Item"
set src in oview(1)
src.Move(usr)
usr << "You got [src]!"
here are the errors
objs.dm:6:error:/mob/Priest:unknown variable type
objs.dm:8:error:/mob/Soldier:unknown variable type
objs.dm:10:error:/mob/GM:unknown variable type
objs.dm:12:error:/mob/Thief:unknown variable type
objs.dm:14:error:/mob/Warior:unknown variable type
objs.dm:16:error:/mob/Wngdmn:unknown variable type
how do i fix it?
ID:180156
Aug 15 2001, 9:57 pm
|
|
In response to AbyssDragon
|
|
tnx...i havnt got that far in the blue book yet :)
~~Eponick~~ |
In response to AbyssDragon
|
|
hmm...its still puting people in the inventory....what do i do?
~~Eponick~~ |
In response to Eponick
|
|
Ah, I assumed you wanted to check the type of the usr. You want to do it to src instead.
-AbyssDragon |
In response to AbyssDragon
|
|
o ok
~~Eponick~~ |
In response to Eponick
|
|
Eponick wrote:
o ok If you want an easy fix (aside from doing your get code the way gavin suggested), instead of checking for each and every type of mob there is, just check for istype(src,/mob)... or even simpler, ismob(src). Where exactly did you define this get proc? If src is actually the thing being picked up... you would have had to have just defined it under atom/movable, or something like that. Move it to obj, and you can forget all about this type checking. |
if(istype(usr,/mob/Priest))
It takes two arguments, the first being the object to check, the second being the type to compare it to.
-AbyssDragon