ID:157669
 
Code:

//targetting system
mob/var
mob/enemy
enemy_marker
targetable
client/DblClick(mob/M)//anyone who double clicks a mob
if(istype(M))//if the mob variable is a mob

del usr.enemy_marker//delete image before it comes up
usr.enemy = M//your enemy is the mob
usr.enemy_marker = image('targeticon.dmi',pixel_y + 10,pixel_x = 0, M)//set the image
usr << usr.enemy_marker
usr << "[M]'s HP: [M.HP]"//get M's name and HP


My issue is that when I use( pixel_y + 10,pixel_x = 0, M) the icon doesnt appear at all. I am trying to move it up higher on the Y axis.
image proc

DM doesn't know what you're trying to do, since the image proc isn't formatted how you're making it.

Also, it would help you if you defined enemy_marker as an image.
mob/var
image/enemy_marker


Then to fix your problem, you use image() correctly.
        usr.enemy_marker = image('targeticon.dmi', M)
usr.enemy_marker.pixel_y = 10
That shouldn't even compile and should cause a runtime error once you fix the compile time error.
The problem is that you're not supplying arguments correctly. First, you can't give positional arguments after named arguments. Second, writing pixel_y + 10 as an argument will constitute a positional argument* (the 2nd one in your case, which is loc), not a named one. You need to use = for that.

*: This argument would be given the value of whatever the var "pixel_y" (which is undefined in your case) has plus 10.