Stat()
statpanel("Status")
stat("Strength: ", str)
stat("Defense: ", def)
statpanel("Weapons")
stat(src.weapons)
statpanel("Shields")
stat(src.shields)
statpanel("Armor")
stat(src.armor)
statpanel("Inventory")
stat(src.contents)
Then I did this for the login code.
Login()
src.icon_state = input("What gender do you wish to be?") in list ("Male","Female")
src.Move(locate(1,1,1))
var/rstr = rand(1,5)
var/rdef = rand(1,5)
src.str = rstr
src.def = rdef
new/obj/Short_Sword(src.weapons)
new/obj/Wooden_Shield(src.shields)
new/obj/Short_Sword(usr)
When I login, there is a short sword in my inventory, but not in my weapons tab, no shield in the shield tab either. I tried it many different ways, but nothing worked. Can someone tell me what could be wrong?
Thanks.
-Rcet
The short sword is being added to inventory because of the third line I've quoted there (although I'd say usr is unsafe here; use src). The other items aren't being set because you forget that the first argument to obj/New() is an atom, a place to put it. What you really need is this:
Both items should appear within your inventory, and now on their proper stat panels as well. I would recommend compressing your weapon and shield stat panels to one single equipment panel, though, because too many stat panels get in the way.
Lummox JR