ID:261519
 
mob
var
HP=100
HPM=100
MP=10
MPM=10
skekey="No"
str=1
arrows=0
shotskill=21
gold=50
weapons=/obj/weapon
Stat()
statpanel("Stats")
stat("Health:","[usr.HP]%")
stat("Magic:","[usr.MP]")
stat("Strength:","[usr.str]")
stat("Arrows:","[usr.arrows]")
stat("Skeleton Key:","[usr.skekey]")
statpanel("Weapons",usr.weapons)

It won't display items under obj/weapon
like
obj/weapon/barrow
Strange Kidd wrote:
mob
var
HP=100
HPM=100
MP=10
MPM=10
skekey="No"
str=1
arrows=0
shotskill=21
gold=50
weapons=/obj/weapon
Stat()
statpanel("Stats")
stat("Health:","[usr.HP]%")
stat("Magic:","[usr.MP]")
stat("Strength:","[usr.str]")
stat("Arrows:","[usr.arrows]")
stat("Skeleton Key:","[usr.skekey]")
statpanel("Weapons",usr.weapons)

It won't display items under obj/weapon
like
obj/weapon/barrow

What is your weapons var supposed to be? A list of all the weapons the player has, or a variable that just contains the weapon the player is using? If it's the first one, you should declare it like this:

list/weapons = list()

add add weapons to the list as they're gained, or if it's the second, you should do it like this:

obj/weapons

and set it equal to a new instance of a weapon somewhere in the actual code, not the definition... like, weapons = new /obj/weapon/sillyputty. Putting

weapons = /obj/weapon

isn't going to do much... /obj/weapon is neither an obj nor a weapon, it's just a description of the path /obj/weapon.
In response to Lesbian Assassin
Ok I tried adding it like this

usr.weapons+=/obj/barrow

this didn't work.

Any suggestions?
In response to Strange Kidd
I have one suggestion: go back, read my post, and then explain to me how what you tried has the eensiest teensiest weensiest little thing to do with anything that I said.

After you've done that, read the following:

1. /obj/weapon is NOT a weapon and it is NOT an object. It is like the blueprint for these things, but in and of itself, it is nothing. You have to tell the code what todo with that blueprint, like so:

usr.weapons += new /obj/weapon


This says, "Make a new obj according to the definitions set forth under the heading of obj/weapon, and add this to the variable usr.weapons."

2. In order for the above code to work, usr.weapons has to be something that can have objects added to it: a list. When you define usr.weapons (defining is when you first list something, as in
mob
var
stuffdefinedhere
), you have to specify that the variable refers to a list, like so:

mob
var
list/weapons = list()


This lets the compiler know that the variable weapons will contain a list. You put the = list() there so that when the game later tries to actually carry out your code, adding things to usr.weapons, there is an actual list inside the variable to which these things can be added.