ToiletMaster Posted January 22, 2013 Group: Members Topic Count: 76 Topics Per Day: 0.02 Content Count: 276 Reputation: 7 Joined: 08/11/12 Last Seen: January 26, 2018 Share Posted January 22, 2013 (edited) [Warning]: npc_scriptcont: failed npc_checknear test. Hi there, i'm getting this warning on my npc. It's not stated here so i'm not sure what the error is, http://rathena.org/w...clared_function This will appear once my character moves too far from the NPC though. since they do have 10 second gap before the next message coming in. Is there any way to solve this error? PS, Once the error comes out the script breaks, like putting a message without close. Thank you. Edited January 23, 2013 by ToiletMaster Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 22, 2013 Already solved here. Quote Link to comment Share on other sites More sharing options...
ToiletMaster Posted January 22, 2013 Group: Members Topic Count: 76 Topics Per Day: 0.02 Content Count: 276 Reputation: 7 Joined: 08/11/12 Last Seen: January 26, 2018 Author Share Posted January 22, 2013 Thanks for the link Capuche (not sure why it din't show up when i do a search that time) However, i did what it stated there but i still get the error. Here's what i did so far in case i did something wrong. First off my header i replaced with this - script Danny Dent -1,{ after the curly for this npc i added this aev_fild,91,152,4 duplicate(Danny Dent) Danny Dent#1 457 am i missing anything? Thanks ! Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 22, 2013 It seems correct. Post your whole script here for testing if you don't mind. Quote Link to comment Share on other sites More sharing options...
ToiletMaster Posted January 22, 2013 Group: Members Topic Count: 76 Topics Per Day: 0.02 Content Count: 276 Reputation: 7 Joined: 08/11/12 Last Seen: January 26, 2018 Author Share Posted January 22, 2013 (edited) Hope you don't mind if i can't give you the entire script. However here's the part that triggers that moment. (Writing a story now and wouldn't like if anyone comes in and steal them xD) mes "Bye bye~"; deltimer strnpcinfo(0)+"::OnMinion"; // <---- must be triggered by ON function addtimer ( 1 * 10000 ),strnpcinfo(0)+"::OnMinion"; // 1 x 10 seconds close; OnMinion: mes "[Minion]"; mes "Hello!? Can you hear me? Hello!"; next; mes "["+strcharinfo(0)+"]"; mes "? Who is this?"; next; mes "[Minion]"; mes "I'm assuming you can hear me."; close; } do ignore the // notes, personal preferences in case i forget xD Edited January 22, 2013 by ToiletMaster Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 22, 2013 (edited) - script hjkl -1,{ mes "Bye bye~"; deltimer "hjkl::OnMinion"; // <---- must be triggered by ON function addtimer ( 1 * 10000 ),"hjkl::OnMinion"; // 1 x 10 seconds close; OnMinion: mes "[Minion]"; mes "Hello!? Can you hear me? Hello!"; next; mes "["+strcharinfo(0)+"]"; mes "? Who is this?"; next; mes "[Minion]"; mes "I'm assuming you can hear me."; close; } prontera,150,150,5 duplicate(hjkl) hjkl#1 456 In that case, use NPC name of the floating NPC instead of duplicate's name NPC in addtimer. Floating NPC bypass check range. Edited January 22, 2013 by Capuche 1 Quote Link to comment Share on other sites More sharing options...
ToiletMaster Posted January 22, 2013 Group: Members Topic Count: 76 Topics Per Day: 0.02 Content Count: 276 Reputation: 7 Joined: 08/11/12 Last Seen: January 26, 2018 Author Share Posted January 22, 2013 (edited) I believe it still happens. I tried walking away quite far from the 10 second break and the error still occurs. I did everything on your script yet it happens though. Just to make sure here's how it goes header - script Danny Dent -1,{ some messages in between then to the lower corner mes "Bye bye~"; deltimer strnpcinfo(0)+"::OnMinion"; // <---- must be triggered by ON function addtimer ( 1 * 10000 ),strnpcinfo(0)+"::OnMinion"; // 1 x 10 seconds close; OnMinion: mes "[Minion]"; mes "Hello!? Can you hear me? Hello!"; next; mes "["+strcharinfo(0)+"]"; mes "? Who is this?"; next; mes "[Minion]"; mes "I'm assuming you can hear me."; close; } aev_fild,91,152,4 duplicate(Danny Dent) Danny Dent#1 457 Edit, did not see the changes sorry capuche. Brb gonna test it out and give the results. Thanks Capuche! You solved the problem! It worked great! However shouldn't strnpcinfo(0) work the same ? why did it work when i placed the name of the npc? Cheers! Edited January 22, 2013 by ToiletMaster Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 22, 2013 (edited) You're welcome However shouldn't strnpcinfo(0) work the same ? why did it work when i placed the name of the npc? addtimer ( 1 * 10000 ),strnpcinfo(0)+"::OnMinion"; trigger label in the current NPC. Your duplicate NPC have coordinates so in that case, addtimer will check if player is near of the NPC. Using label of floating NPC bypass this check. Edited January 22, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
ToiletMaster Posted January 23, 2013 Group: Members Topic Count: 76 Topics Per Day: 0.02 Content Count: 276 Reputation: 7 Joined: 08/11/12 Last Seen: January 26, 2018 Author Share Posted January 23, 2013 You're welcome However shouldn't strnpcinfo(0) work the same ? why did it work when i placed the name of the npc? addtimer ( 1 * 10000 ),strnpcinfo(0)+"::OnMinion"; trigger label in the current NPC. Your duplicate NPC have coordinates so in that case, addtimer will check if player is near of the NPC. Using label of floating NPC bypass this check. Understood! Thanks for the everything + the explanation! Quote Link to comment Share on other sites More sharing options...
Question
ToiletMaster
[Warning]: npc_scriptcont: failed npc_checknear test.
Hi there, i'm getting this warning on my npc.
It's not stated here so i'm not sure what the error is,
http://rathena.org/w...clared_function
This will appear once my character moves too far from the NPC though.
since they do have 10 second gap before the next message coming in.
Is there any way to solve this error?
PS,
Once the error comes out the script breaks, like putting a message without close.
Thank you.
Edited by ToiletMasterLink to comment
Share on other sites
8 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.