Jump to content
  • 0
vBrenth

I keep getting failed msgs.

Question

/*========================================== * @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.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

maybe it should return true instead of return 0, also for npc call @ you should use bindatcommand :)

 

 

---------------------------------------
 
*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;
}
 
---------------------------------------

Share this post


Link to post
Share on other sites
  • 0

 

/*========================================== * @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;

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.