I keep getting failed msgs.

vBrenth

New member
Messages
391
Points
0
Age
35
Location
Philippines
Discord
Brenth
Github
vBrenth
Emulator
Client Version
RE
/*========================================== * @buffmanage *------------------------------------------*/ACMD(buffmanage){  nullpo_retr(-1,sd);   npc_event(sd,"Buff::OnBuffManage",0);  return 0;}
I keep getting @buffmanage failed, but it still works. and my other custom commands.

 
maybe it should return true instead of return 0, also for npc call @ you should use bindatcommand
default_smile.png


---------------------------------------
 
*bindatcmd "command","<NPC object name>::<event label>"{,<group level>,<group level char>,<log>};
 
This command will bind a NPC event label to an atcommand. Upon execution 
of the atcommand, the user will invoke the NPC event label. Each atcommand 
is only allowed one binding. If you rebind, it will override the original 
binding. If group level is provided, only users of that group level or 
above will be able to access the command, if not provided, everyone will 
be able to access the command.
"group level char" is the minimum group level required for the label to be 
used on others like a char command would, e.g. "#command "target" params", 
when not provided, "group level char" defaults to 99.
"log" whether to log the usages of this command with the atcommand log 
(1 = log, 0 = no log), default is to not log.
 
The following variables are set upon execution:
.@atcmd_command$       =  The name of the @command used.
.@atcmd_parameters$[]  =  Array containing the given parameters, 
                              starting from an index of 0.
.@atcmd_numparameters  =  The number of parameters defined.
 
Example:
 
When a user types the command "@test", an angel effect will be shown.
 
- script atcmd_example -1,{
OnInit:
bindatcmd "test",strnpcinfo(3)+"::OnAtcommand";
end;
OnAtcommand:
specialeffect2 338;
end;
}
 
---------------------------------------
 
/*========================================== * @buffmanage *------------------------------------------*/ACMD(buffmanage){ nullpo_retr(-1,sd); npc_event(sd,"Buff::OnBuffManage",0); return 0;}I keep getting @buffmanage failed, but it still works. and my other custom commands.
evilpuncker showed u an alternative..but , if still you want solution

change

return 0;

To

return true;

 
Last edited by a moderator:
Back
Top