I'm trying to make a "Remove play song verb" for my icon game (Yeah, yeah, there's too many already, I know.) but the coding I got looks like it should work. Someone reply if they can help me fix my problem.

This is the coding I have for it:

Remove_Song_Verb(mob/M in world)
set category = "Owner"
set desc = "Remove a player's song verb."
if(alert("Are you sure?","Remove song verb","Yes","No") == "Yes")
M.verbs -= typesof(/mob/verb/Play_Song)
world << "[src] has removed [M]'s song verb."

The verb appears in my GM tab, the message is displayed to the world but, lo and behold, my victim still has their play song verb afterwards. The verb's exact name is "Play_Song", the refernce to the path mob/verb/Play_Song is correct, and I still can't find the problem.
Just make the verb in a different path.


// Coding here

Then use what you have now, but instead remove the verb like this:

M.verbs -= /mob/song/verb/Play_Song

That pretty much makes the verb under a new mobtype, you can put it under mob/other/verb, or whatever it takes to lessen confusion.

In response to SSJ2GohanDBGT
Maybe I'm just an idiot but when I code it in like that the verb doesn't appear to mobs at all.
In response to SSJ2GohanDBGT
His mobs aren't /mob/song mobs, so that won't work at all.

Try keeping the verb at the same path as before, but removing the verbs like this, as suggested: M.verbs -= /mob/verb/Play_Song

I have a sneaking suspicion that typesof() will only work with verbs if "verb" is the last bit of the type path.
In response to Crispy
Whoohoo! It works! Thanks for your help!
In response to Crispy
It will work. He just has to give the verb to the person in the first place. Im not sure what game hes making, and one or the other way may be better depending. If he wants all of the mobs to have it, your way would be better. If he wants a select number of people to have it, he can have it given to them upon login.
In response to SSJ2GohanDBGT
SSJ2GohanDBGT wrote:
It will work. He just has to give the verb to the person in the first place.

True, but he's not. =)