ID:1633254
 
(See the best response by GhostAnime.)
Code:
mob
Boxer
verb
Meele(mob/M)//Meele proc var declared: M is mob
if(!usr.BMeeleCD)return
usr.BMeeleCD = FALSE
if(M in oview(1))
flick('Boxer.dmi',usr)// flick jab
flick("Jab",usr)// ^
world<<output( "[usr] hit [M] for [str] dmg", "output1")
sleep(5)
usr.BMeeleCD = TRUE


Problem description:
how do i make the pop up stop popping up

The pop-up appears because you're asking the verb for an argument. To get around this you'd either want to loop through all mobs within one tile of the player and attack the first one you find, or limit it to only mobs standing directly in front of the player.
yeah i tried using oview but it didnt work
and i also tried to use view
actually can you explain how exactly am i suppose to do that a proc or something
Best response
        verb
Meele(mob/M)


By the argument (definition in the parenthesis [brackets]), you are asking the usr to pick a /mob to send, hence the popup.

What you want to do is NOT define the argument and have another function pick the /mob in the code block instead:
Melee()
var/mob/M = locate(/mob) in get_step(SRC, SRC.DIR) // Try to see if anyone is a step ahead
if(!M) CRASH("No one found")


I hope you remember that examples are not meant to be copy/pasted from but analyzed to see what happened.
ok i did but i have a problem it works but when no mob is there my skill breaks
 mob
Boxer
verb
Meele()
var/mob/M = locate(/mob)
if(!usr.BMeeleCD)return
usr.BMeeleCD = FALSE
if(M in view(1,src.loc))
if(M.dir&&usr.dir)
flick('Boxer.dmi',usr)// flick jab
flick("Jab",usr)// ^
world<<output( "[usr] hit [M] for [str] dmg", "output1")
sleep(5)
usr.BMeeleCD = TRUE
it stops working
First off, "locate(/mob)" by itself will search for ANY /mob ANYWHERE in the world and return the first /mob. That means you can attack a /mob that is on a different Z level!

Second of all, if you do specify a certain location to be checked via get_step(), o/view/ers() and/or o/hear/ers(), you have to make sure that the /mob actually exists.

if(M) ==> if(M is TRUE) ==> if(M is NOT FALSE) ==> if(M != 0, "" or null)

if(!M) ==> if(M is FALSE) ==> if(M == 0, "" or null)


Finally:
if(M.dir&&usr.dir)
Read what it says. Got it? If not, you are saying only do damage if you and M (whoever/where ever it may be) has a direction - which they do; this statement is pointless.
mob
Boxer
verb
Meele()
var/mob/M = locate(/mob) in get_step(src, src.dir)
if(M)
if(!usr.BMeeleCD)return
usr.BMeeleCD = FALSE
if(M in view(1,src.loc))
if(M in usr.dir)
flick('Boxer.dmi',usr)// flick jab
flick("Jab",usr)// ^
world<<output( "[usr] hit [M] for [str] dmg", "output1")
sleep(5)
usr.BMeeleCD = TRUE
still doesnt work
In response to YoungJR1232
Two of the if statements you have there are either redundant (if(M in view(1,src.loc), which is already covered by the locate(/mob) in get_step(...) part) or just flat out don't work (if(M in usr.dir)).

// This is what you need at most.
mob/verb/InfrontOfMe()
set name = "Infront of me!"

var mob/m = locate() in get_step(src, src.dir)

if (m)
// Do stuff with m here, like you were doing.
ty finally it works ill because of the little stuff