ID:148080
 
Stat()
stat("stats:",desc.src)

The preceding code makes the stat tab, but how can I make other stat tabs to organize the way data is displayed.

For example, I would like to add a tab that lets the usr view his armor

by the way...how can I include the icon for the armor in that tab?

Thank you,

mob/Stat()
statpanel("Inventory")
stat(contents)


then when you equip the armor, you need to do this..
 usr.contents += src

Put that where you pickup the armor, then when you delete the armor..
usr.contents -= src

This will add a picture by the name.

-Camaro-
In response to Camaro
Camaro wrote:
> mob/Stat()
> statpanel("Inventory")
> stat(contents)
>


To see what this is about, you can read about this in the Guide:

http://www.byond.com/docs/guide/chap07.html#7.3
In response to Camaro
thanks, but I ran into a problem recently, its driving me crazy...

Maybe I just never noticed, but my items say "the" infront of their name... my armor tab says


Head: the leather helmet

it should say

Head: leather helmet
In response to Xallius
Xallius wrote:
thanks, but I ran into a problem recently, its driving me crazy...

Maybe I just never noticed, but my items say "the" infront of their name... my armor tab says


Head: the leather helmet

it should say

Head: leather helmet

That's the system trying to be helpful, for other circumstances. To avoid it, instead of statting the object, stat the object's name.
In response to Deadron
I don't know about this, but don't you have to start it with a capital?


-Camaro-

ps: either way, capitals look better =P

In response to Camaro
Camaro wrote:
I don't know about this, but don't you have to start it with a capital?

You can do that, but the prefix "the" is useful in some circumstances.