ID:140325
 
Code:
mob
verb
KickMob1()
var/mob/NPCs/M
for(M in world)
if(M.Owner==src.key&&M.GSlot1==1)
M.Owner=null
M.Obtainable=1
M.GSlot1=0
src.Owned1=null
Update_Gambit1()
return
else
return

KickMob2()
var/mob/NPCs/M
for(M in world)
if(M.Owner==src.key&&M.GSlot2==1)
M.Owner=null
M.Obtainable=1
M.GSlot2=0
src.Owned2=null
Update_Gambit2()
return
else
return

KickMob3()
var/mob/NPCs/M
for(M in world)
if(M.Owner==src.key&&M.GSlot3==1)
M.Owner=null
M.Obtainable=1
M.GSlot3=0
src.Owned3=null
Update_Gambit3()
return
else
return


Problem description:
I'm trying to make a party system with slots for NPC party members. The party members enter the party fine, in the appropriate slots, but the problem occurs when I try to remove them from the party. What is shown above are the three verbs I use to remove a member from a particular slot. I can remove a party member from any slot using these three verbs (which are put on buttons in the party interface) but the problem is, it will only work if the mob in whichever slot was the first mob I placed on the map. For example, if the first mob placed on the map was in slot 3, the KickMob3() verb would work just fine; similarly if the first mob placed on the map was in slot 1 or 2, their respective verbs would also work fine. It just doesn't work with any other mobs besides the one placed first on the map! Can anyone please help me with this?

In response to Garthor
Thanks, but now I feel a little dumb. Problem is fixed now.