ID:141491
 
Code:
obj
Training_Equipment
icon = 'Objects.dmi'
Punching_Bag
icon_state = "pbag"
density = 1
verb/Punch(src in get_step(usr,usr.dir))
set hidden = 1
set src in oview(1)
if(usr.Delay)
return
if(!usr.Full_Access)
if(usr.SSJ1 == 1 || usr.SSJ2 == 1 || usr.SSJ3 == 1 || usr.SSJ4 == 1 || usr.SSJ5 == 1)
usr << "Please revert to train!"
return
usr.Strength += rand(1,2)
usr.Defense += rand(1,3)
usr.Exp += rand(1,2)
usr.LevelUp()
usr.Update_Exp()
usr.Update_Ki()
usr.Update_Powerlevel()
flick("pbaghit",src)
usr.Delay = 1
sleep(5)
usr.icon_state = ""
usr.Delay = 0
else
if(usr.SSJ1 == 1 || usr.SSJ2 == 1 || usr.SSJ3 == 1 || usr.SSJ4 == 1 || usr.SSJ5 == 1)
usr << "Please revert to train!"
return
usr.Strength += rand(1,5)
usr.Defense += rand(1,6)
usr.Exp += rand(1,5)
usr.LevelUp()
usr.Update_Exp()
usr.Update_Ki()
usr.Update_Powerlevel()
flick("pbaghit",src)
usr.icon_state = "punch1"
usr.Delay = 1
sleep(5)
usr.icon_state = ""
usr.Delay = 0
verb/Kick(src in get_step(usr,usr.dir))
set hidden = 1
set src in oview(1)
if(usr.Delay)
return
if(!usr.Full_Access)
if(usr.SSJ1 == 1 || usr.SSJ2 == 1 || usr.SSJ3 == 1 || usr.SSJ4 == 1 || usr.SSJ5 == 1)
usr << "Please revert to train!"
return
usr.Strength += rand(1,2)
usr.Defense += rand(1,3)
usr.Exp += rand(1,2)
usr.LevelUp()
usr.Update_Exp()
usr.Update_Ki()
usr.Update_Powerlevel()
flick("pbaghit",src)
usr.icon_state = "kick1"
usr.Delay = 1
sleep(5)
usr.icon_state = ""
usr.Delay = 0
else
if(usr.SSJ1 == 1 || usr.SSJ2 == 1 || usr.SSJ3 == 1 || usr.SSJ4 == 1 || usr.SSJ5 == 1)
usr << "Please revert to train!"
return
usr.Strength += rand(1,5)
usr.Defense += rand(1,6)
usr.Exp += rand(1,5)
usr.LevelUp()
usr.Update_Exp()
usr.Update_Ki()
usr.Update_Powerlevel()
flick("pbaghit",src)
usr.icon_state = "kick1"
usr.Delay = 1
sleep(5)
usr.icon_state = ""
usr.Delay = 0


Problem description:

Everytime I punch my punching bags it tells me this:

"Sorry, the following is not valid: Punching-Bag
usage: Kick Punching-Bag parameter
usage: Kick mob"

The Punching bags punch and kick verbs are the same name as my real punch and kick verb.

EXAMPLE;

Attacking:
mob/verb/Punch(mob/M in oview(1))
usr << "You got punched."
mob/verb/Kick(mob/M in oview(1))
usr << "You got kicked."


Punching Bag:
mob/verb/Punch(mob/M in oview(1))
usr << "You punched a pbag."
mob/verb/Kick(mob/M in oview(1))
usr << "You kicked a pbag."
You're punching an obj, not a mob.
Your examples don't make sense, but anyway-

Gizhy wrote:
The Punching bags punch and kick verbs are the same name as my real punch and kick verb.

Congratulations on stating your problem yourself. IIRC since the command to use both verbs is the same, there's virtually no way to differentiate and whenever that command is used just one verb is arbitrarily chosen (probably the first one found to match) and the other can't be used.
Also, you're not properly using verb arguments on your punching bag verbs.
The object you created is an obj. You told the code that it was a mob (in your example shown). Plus, you can't have two different things programmed using the same verb. For example, if I used Punch() for my fighting system, I cannot create a seperate Punch() for a training system. Ohterwise the system will only work for one thing or neither.