ID:265024
 
Code:
client/proc
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"
winset(src,kKey,{"parent="Game";name=[kKey];command="[escape_text(runProc)]""})

mob/verb
ApplyBind(k,cmd)
src.macs[k]="NAME OF COMMAND"
src.m_cmd[k]=cmd
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 (#1)
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)

EDIT:
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?

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