Jump to content
  • 0

checknear error


ToiletMaster

Question


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  276
  • Reputation:   7
  • Joined:  08/11/12
  • Last Seen:  

[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 ToiletMaster
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Already solved here.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  276
  • Reputation:   7
  • Joined:  08/11/12
  • Last Seen:  

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 !

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

It seems correct. Post your whole script here for testing if you don't mind.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  276
  • Reputation:   7
  • Joined:  08/11/12
  • Last Seen:  

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 by ToiletMaster
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

-	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 by Capuche
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  276
  • Reputation:   7
  • Joined:  08/11/12
  • Last Seen:  

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 by ToiletMaster
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

You're welcome /no1

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 by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  276
  • Reputation:   7
  • Joined:  08/11/12
  • Last Seen:  

You're welcome /no1

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!

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...