addMacro(kKey as text, runProc as command_text, repeat = 0, release = 0, shift = 0, alt = 0, ctrl = 0)
if(release) kKey += "+UP"
if(repeat) kKey += "+REP"
if(shift) kKey += "+SHIFT"
if(alt) kKey += "+ALT"
if(ctrl) kKey += "+CTRL"

src.macs[k]="NAME OF COMMAND"
src.client.addMacro(k,cmd,1,0,0,0,0)//this line works
// src.client.addMacro(k,cmd,0,0,0,0,0) but when i set the repeat to 0, it fails.

Problem description:
the second (grey) line doesnt work, but the first one does.
ofc - I only ever have one or the other.
the difference is the 1/0 in the argument. And it represents the REPEAT argument
If you want help you need to say what the problem is, assuming people are going to read your code and figure out the problem themselves is pretty short-sighted.
In response to Nadrew
OOps, I thought I did; I was in the midst of editing it...
The code does explain it, though.

When I set the repeat argument to 1, everything works fine, when I set it to 0, it falls apart (doesnt set the macro)

After dithering around with macros - it seems possible that the codes working just fine, but BYOND no longer recognises any macro unless it is set for repeat? BYOND bug perhaps?

Turns out, if ANY of the arguments == 1, it works. Otherwise if they all == 0 it fails