Noctis Posted June 26, 2017 Posted June 26, 2017 (edited) How to solve? it worked before why is not working now o.o, //this is the function script D_huntermark { return (countitem(1004) > 0 || countitem(1006) > 0); } //And I used this to call the function if (!callfunc("D_huntermark")) { Edited June 26, 2017 by Noctis Quote
0 Noctis Posted June 26, 2017 Author Posted June 26, 2017 Update: It works, but still say overwriting o.O Quote
0 n0tttt Posted June 27, 2017 Posted June 27, 2017 You have that function two times. Search in a file you are suspicious about or use the search in multiple files function in Sublime Text or Notepad++. Quote
0 Noctis Posted June 27, 2017 Author Posted June 27, 2017 2 minutes ago, n0tttt said: You have that function two times. Search in a file you are suspicious about or use the search in multiple files function in Sublime Text or Notepad++. I have another file that call that function, its because of that? Quote
0 n0tttt Posted June 27, 2017 Posted June 27, 2017 2 hours ago, Noctis said: I have another file that call that function, its because of that? No, I mean you have another function script with that name. Calling doesn't resolve in the message you shown. Quote
0 Noctis Posted June 27, 2017 Author Posted June 27, 2017 8 hours ago, n0tttt said: No, I mean you have another function script with that name. Calling doesn't resolve in the message you shown. I have only 1 file with that function, thats why its weird Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 (edited) On 6/27/2017 at 5:36 AM, Noctis said: How to solve? it worked before why is not working now o.o, //this is the function script D_huntermark { return (countitem(1004) > 0 || countitem(1006) > 0); } //And I used this to call the function if (!callfunc("D_huntermark")) { try closing the function script with "end;" function script D_huntermark { return (countitem(1004) > 0 || countitem(1006) > 0); end; } Edited June 28, 2017 by Keitenai Quote
0 Noctis Posted June 28, 2017 Author Posted June 28, 2017 3 minutes ago, Keitenai said: try closing the function script with "end;" script D_huntermark { return (countitem(1004) > 0 || countitem(1006) > 0); end; } still says overwriting, so weird... Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 function script D_huntermark { return (countitem(1004) > 0 || countitem(1006) > 0); end; } add the "function" on your script Quote
0 Noctis Posted June 28, 2017 Author Posted June 28, 2017 1 minute ago, Keitenai said: function script D_huntermark { return (countitem(1004) > 0 || countitem(1006) > 0); end; } add the "function" on your script Ye I added Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 try check all your custom scripts and see if there's a duplicated function as @n0tttt suggests Quote
0 Noctis Posted June 28, 2017 Author Posted June 28, 2017 4 minutes ago, Keitenai said: try check all your custom scripts and see if there's a duplicated function as @n0tttt suggests I dont think so, already checked, I even tried to change the function name :/ Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 post the full script. perhaps a revision is needed Quote
0 Noctis Posted June 28, 2017 Author Posted June 28, 2017 (edited) @Keitenai Edited June 28, 2017 by Noctis Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 (edited) Try this: if(!countitem(47007)){ Edited June 28, 2017 by Keitenai Quote
0 Noctis Posted June 28, 2017 Author Posted June 28, 2017 (edited) but now the function script D_huntermark is gone xD [EDIT] it worked, but cant find the function in the script o.O, how can it work without the function lol @Keitenai Edited June 28, 2017 by Noctis Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 are you using it for other script? if so then you can just change the: if (!callfunc("D_huntermark")) { in to this: if(!countitem(47007)){ 1 Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 (edited) or try to remove the "||" on your function: function script D_huntermark { return (countitem(47007) > 0); } and keep everything else as it was Edited June 28, 2017 by Keitenai Quote
0 Noctis Posted June 28, 2017 Author Posted June 28, 2017 7 minutes ago, Keitenai said: are you using it for other script? if so then you can just change the: if (!callfunc("D_huntermark")) { in to this: if(!countitem(47007)){ Ye Im using for other script, then I dont need to call the function anymore? Quote
0 Keitenai Posted June 28, 2017 Posted June 28, 2017 No need to make additional function for item check, plus you will also free a small portion of your server resources by removing the function script. 1 Quote
0 Noctis Posted June 28, 2017 Author Posted June 28, 2017 1 minute ago, Keitenai said: No need to make additional function for item check, plus you will also free a small portion of your server resources by removing the function script. Thanks for the help, so now instead of calling the function, I use if(!countitem(47007)){? Quote
Question
Noctis
How to solve? it worked before why is not working now o.o,
21 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.