Okay, I know about istype(), and all that stuff, but i have a problem.
Okay, in my game, Im trying to make it so that u cant equip certain things, if you dont have the right ship. Conviently, I have a variable, called oldship, that has your current ship type recorded (for other stuff). So I do
if(!istype(src.design,usr.oldship)) in the equip command. Then a "You cannot equip this" blah blah blah because src.design is not the type of usr.oldship! then a return command. otherwise, it goes on as normal. (design = the type of ship u need to be, to be able to equip the item, in this case, design = /mob/ships/Fighters/Red and oldship = /mob/ships/Fighters/Red/Lvl3)
But it doesnt work. I get "You cannot equip" blah blah blah. as if either src.design or usr.oldship werent the same class -_-. If you need a more detailed explanation using the code that i use, then here:
proc
Equip()
if(!istype(src.design,usr.oldship))
usr << "Your ship is not the correct design for this equipment!"
return
//rest of equip stuff
hopefully, that helps. Thanks for anyone that can give me help!
*EDIT* I've done this about 100 different ways, please tell me of potential ways that i can do =/
EDIT
Now its not.