mob
Merchant
icon = 'SpecialClothingNPC.dmi'
icon_state = ""
name = "{NPC}SpecialClothier"
npc = 1
verb
Talk()
set category = "NPC's"
set src in oview(2)
switch(input("Yo sup, wanna buy some clothes?", text) in list ("Yes","No"))
if("Yes")
switch(input("What do you want to buy?", text) in list ("TobiMask","ArmGuards"))
if("TobiMask")
var/K = new/obj/TobiMask
K:loc = usr
usr << "<b>Have a nice day!"
if("Armguards")
var/K = new/obj/Armguards
K:loc = usr
usr << "<b>Have a nice day!"
//-------------------------------------------------------------------------------------------------
obj
TobiMask
name = "TobiMask"
icon = 'TobiMask.dmi'
verb
Wear()
if(src.worn)
src.worn = 0
usr.overlays -= src.icon
else
src.worn = 1
usr.overlays += src.icon
Drop()
if(src:worn == 1)
usr << "Not while its being worn."
if(src:worn == 0)
src.loc=locate(usr.x,usr.y-1,usr.z)
Get()
set src in oview(1)
src.loc = usr
usr<<"You picked up a [src]"
obj
ArmGuards
name = "ArmGuards"
icon = 'ArmGuards.dmi'
verb
Wear()
if(src.worn)
src.worn = 0
usr.overlays -= src.icon
else
src.worn = 1
usr.overlays += src.icon
Drop()
if(src:worn == 1)
usr << "Not while its being worn."
if(src:worn == 0)
src.loc=locate(usr.x,usr.y-1,usr.z)
Get()
set src in oview(1)
src.loc = usr
usr<<"You picked up a [src]"
<dm>
Why are these undefined vars? I keep getting these errors:
Clothing\Clothes.dm:313:error: npc: undefined var
Clothing\Clothes.dm:339:error: src.worn: undefined var
Clothing\Clothes.dm:340:error: src.worn: undefined var
Clothing\Clothes.dm:343:error: src.worn: undefined var
Clothing\Clothes.dm:346:error: src/:/worn: undefined var
Clothing\Clothes.dm:348:error: src/:/worn: undefined var
Clothing\Clothes.dm:362:error: src.worn: undefined var
Clothing\Clothes.dm:363:error: src.worn: undefined var
Clothing\Clothes.dm:366:error: src.worn: undefined var
Clothing\Clothes.dm:369:error: src/:/worn: undefined var
Clothing\Clothes.dm:371:error: src/:/worn: undefined var
Baruto.dmb - 11 errors, 0 warnings
I added
mob/var |
I apologize.... I thought that was what you gave the code to me for :/ what should i do otherwise? and do you think you could explain it to me just a little more? I have read the guide and im learning some stuff but im just not seeming to understand what I am doing wrong here.
|
Etc