ID:146214
 
It's terrible...two innocent murderers have already been disintegrated by it....

Code:
var
gold = 1000
lx
ly
lz
beenhere = 0
lastversion = 0
list/army

Stat()        //Call the Stat proc that updates the stat window every Tenth of a second...
if(src == usr) statpanel("Inventory",src.contents)
if(src == usr) statpanel("Army",usr.army)

        Noncombat
verb
Add_to_army()
src.loc = usr.army
Remove_from_army()
src.loc = usr


Problem description:
When I use Add to army on a unit in my inventory, it disappears from the inventory, but doesn't appear in the Army tab.
VDZ wrote:
        Noncombat
verb
Add_to_army()
src.loc = usr.army
Remove_from_army()
src.loc = usr


First, you can't set a loc to a list. I think what you want to do is add yourself to the list.

Noncombat/verb
Add_to_army()
usr.army += src // add the guy to your army list
src.loc = null // hide it
Remove_from_army()
usr.army -= src
src.Move(usr) // move it back to your inventory


I'm assuming Noncombat is a type path of a mob, since you never specified whether it is a mob, obj, or whatever.

~~> Dragon Lord



In response to Unknown Person
Noncombat is in /obj/Pieces/, and is meant for categorizing noncombat verbs (at certain points, they are removed and given back).

Anyways, as soon as the object is in the army (yes, it finally gets there) it loses all verbs. This means I have to use a bug to get it back to my inventory.
In response to VDZ
I managed to fix it. Thanks.
If you're interested, the final code was
        Noncombat
verb
Add_to_army()
set src in usr
usr.army += src // add the guy to your army list
src.loc = null // hide it
Remove_from_army()
set src in world
new src.type (usr)
del src