Hi folks! According to the wiki, it is possible to call a function as a script command :
http://herc.ws/wiki/Functions#Calling_Function_as_a_Script_Command
However, I am unable to reproduce the example. The console throws me a parse_line error :
[Error]: script error in file 'npc/test/test.txt' line 91 column 12
parse_line: need ';'
90: {
* 91: mes Add(1,2);
~~~~~~~~~~~^
92:
93: function Add {
94: return (getarg(0)+getarg(1));
Is there any way to make this work? Or is it an error on the wiki?
Thanks in advance!
http://herc.ws/wiki/Functions#Calling_Function_as_a_Script_Command
Calling Function as a Script Command
prontera,150,150,5<TAB>script<TAB>Calculator<TAB>999,{
mes Add(1,2);
function<TAB>Add<TAB>{
return (getarg(0)+getarg(1));
}
}
However, I am unable to reproduce the example. The console throws me a parse_line error :
[Error]: script error in file 'npc/test/test.txt' line 91 column 12
parse_line: need ';'
90: {
* 91: mes Add(1,2);
~~~~~~~~~~~^
92:
93: function Add {
94: return (getarg(0)+getarg(1));
Is there any way to make this work? Or is it an error on the wiki?
Thanks in advance!