Noctis Posted June 26, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Share 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 Link to comment Share on other sites More sharing options...
0 Noctis Posted June 26, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share Posted June 26, 2017 Update: It works, but still say overwriting o.O Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted June 27, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Friday at 02:39 AM Share 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 Link to comment Share on other sites More sharing options...
0 Noctis Posted June 27, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 n0tttt Posted June 27, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Friday at 02:39 AM Share 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 Link to comment Share on other sites More sharing options...
0 Noctis Posted June 27, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Noctis Posted June 28, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share Posted June 28, 2017 function script D_huntermark { return (countitem(1004) > 0 || countitem(1006) > 0); end; } add the "function" on your script Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted June 28, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share Posted June 28, 2017 try check all your custom scripts and see if there's a duplicated function as @n0tttt suggests Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted June 28, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share Posted June 28, 2017 post the full script. perhaps a revision is needed Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted June 28, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share Posted June 28, 2017 (edited) @Keitenai Edited June 28, 2017 by Noctis Quote Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share Posted June 28, 2017 (edited) Try this: if(!countitem(47007)){ Edited June 28, 2017 by Keitenai Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted June 28, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Noctis Posted June 28, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Noctis Posted June 28, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 Keitenai Posted June 28, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share Posted June 28, 2017 yeap Quote Link to comment Share on other sites More sharing options...
Question
Noctis
How to solve? it worked before why is not working now o.o,
Link to comment
Share on other sites
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.