ID:262815
 
Code:


Problem description:

I keep getting an error saying:
NPC(s)\Shopkeeper\Armours Sales.dm:3:/= :warning: variable defined but not used.

But i don't know why
Heres the code

var/obj/Equipment/Armours/=new
You delcared the variable, but you didnt use it.
In response to Blakdragon77
NPC(s)\Shopkeeper\Armours Sales.dm:3:error:obj/Equipment/Armours:undefined var
NPC(s)\Shopkeeper\Armours Sales.dm:3:error:new :bad variable definition
Objects\Equipment\Armours\Armours.dm:17:error:usr.armour_eq: undefined var
Objects\Equipment\Armours\Armours.dm:18:error:usr.armour:und efined var
Objects\Equipment\Armours\Armours.dm:26:error:usr.armours:un defined var
Objects\Equipment\Armours\Armours.dm:44:error:examine_Armour :undefined var
Objects\Equipment\Armours\Armours.dm:43:examine_armour :warning: variable defined but not used

theres the errors but i have used them
It seems you have variables that aren't declared.

Do you have:

mob/var/armour


Inside your code?
This goes to all the undefined variables, make sure they are declared.
In response to Blakdragon77
obj/Equipment

Armours
name = "Armours"
density = 0

equiped = 0
value = 3000

anti_decay = 0

var
Armours

Click()
if(src in usr:contents)
if(usr.armour_eq == 0)
if(usr.armour == 0)
usr.overlays += Armours
usr << "You have equiped the: [src]."
suffix = "(Worn)"
usr.capes = 1
usr.capes_eq = 1
src.equiped = 1
else
if(usr.armours == 1)
if(src.equiped == 1)
usr.overlays -= Armours
usr << "You have unequiped the: [src]."
suffix = null
usr.capes = 0
usr.capes_eq = 0
src.equiped = 0
else
usr << "Error: You may only have one of: [src.name] equiped."
return


verb

Examine()
set category = null
var/examine_armour = "<body bgcolor=#000000 text=#FFFFFF><table border=0 cellspacing=1 width=250 id=AutoNumber1 height=210><tr><td width=273 colspan=2 height=18><font face=Verdana color=#FF0000>Cape</font></td></ tr><tr><td width=96 height=12><font size=1 color=red face=Verdana>Condition:</font></td><td width=170 height=12><font size=1><font face=Verdana>[condition]</font></ font><font size=1 face=Verdana> / [condition_max]</font></td></ tr><tr><td width=96 height=12><font face=Verdana size=1 color=#FF0000>Trait</font><font size=1 color=red face=Verdana>:</font></td><td width=174 height=12><font face=Verdana size=1>Armour</font></td></ tr><tr><td width=96 height=12><font face=Verdana size=1 color=#FF0000>Owner:</font></td><td width=174 height=12><font face=Verdana size=1>[usr]</font></td></ tr><tr><td width=273 colspan=2 height=48 style=font-family: Verdana; font-size: 8pt; font-weight: bold><font face=Verdana size=1>A simple Cape used to drape the wearer. Offers very good protection, also is very light causing no increased strain on the wearer..</font></td></tr></table>"
usr << browse(examine_Armour,"window=Armour;size=300x275;border=0;c an_resize=0; can_minimize=0;")

Pick_Up()
set src in oview(0)
set category = null
if(Move(usr))
usr << "You have picked up the: [src]."
usr.inven_min += 1
else
usr << "You are unable to pick up the: [src]."

Drop()
set category = null
if(src.equiped == 0)
src.loc = usr.loc
usr << "You have dropped the: [src]."
usr.inven_min -= 1
else
usr << "You are unable to drop: [src.name], it's already equipped."


Thats the whole thing i don't know whats wrong and i only started coding 3 hours ago
for some reason it says var/obj/Equipment/Armours is undefined but when i check the list ts there