verb
Talk()
set src in oview(2)
if(usr.icon == 'mobs.dmi')
if(usr.talkd == 0)
var/yn = input(usr,{""Hello!", the dog catcher says, "Do you want to deposit some strays?""},"") in list ("Yes","No")
switch(yn)
if("Yes")
var/cages = 0
var/pay = 0
for(var/obj/items/Carrier/C in usr)
if(C.used == 1)
cages += 1
for(var/mob/M in C)
if(M.icon_state != "wolf1"&&M.icon_state != "wolf2")
M <<"<b>The Animal Handler dumps you into the For Sale cage."
M.bought = 0
M.owner = ""
M.OrigName()
M.loc = locate("cage")
else
M <<"<b>The Animal Handler dumps you into a cage."
M.bought = 2
M.owner = ""
M.OrigName()
M.loc = locate("wolves")
pay += 10
pay += cages*50
alert(usr,"You unloaded [cages] animals. I'll pay you $[pay] for that.")
usr.cash += pay
if("No")
alert(usr,"Alright then.")
Problem description:
It says I have no full cages, when I do.
First of all, you really do not need switch() here, a simple if would have worked:
For the full cage stuff, are you referring to the animal stuff in the for() shown? If so - make sure you put debugging statements (ex: world << "Animal found in cage") so you know it has been found since the message is sewnt to M and not usr