mob
Rebel_boy
icon = 'Player12.dmi'
icon_state = ""
NPC = 1
HP = 100000000
rebel = 1
if(usr.contents=/obj/Map_to_the_Boy)
verb
Give()
usr.contents-=/obj/Map_to_the_Boy
usr << "Thanks a ton! I have been waiting forever! Mommy!! I got my treasure map!"
usr.quest3+=1
obj
Map_to_the_Boy
icon = 'Maps.dmi'
icon_state = ""
sellamount = 0
verb/Get()
set src in oview(1)
usr.contents+=new/obj/Map_to_the_Boy
del(src)
Problem description:when i compile, i get error(in the mob) about usr.contents being an undefined var(even though I used it in the map maker code to add the maps to usr.contents) and 2 errors about empty type name((Indention Error?))
if(usr.contents=/obj/Map_to_the_Boy)
This is going to give you errors unless you use the correct operator. When comparisons are being made you use ==, not =.
if(usr.contents == /obj/Map_to_the_Boy)
But actually, you need to be using locate().
I'm also going to guess you're getting errors from trying to add and subtract object types instead of objects from your contents list.
You could also use a for() loop to locate and remove the map.
A final word of advice: the contents list is not a good candidate for inventories because it is a special list and you can't perform all list functions on it.