Issue Information
-
#005343
-
2 - Fair
-
Fixed
Issue Confirmations
-
Yes (2)No (0)
Originally posted by EvilPuncker
[Error]: delete_timer error : function mismatch 005387FD(npc_timerevent) != 00538203(unknown timer function)
it happens when using:
#define SECURE_NPCTIMEOUT 60
#define SECURE_NPCTIMEOUT_INTERVAL 1
after talking with any NPC
[Error]: delete_timer error : function mismatch 005387FD(npc_timerevent) != 00538203(unknown timer function)
it happens when using:
#define SECURE_NPCTIMEOUT 60
#define SECURE_NPCTIMEOUT_INTERVAL 1
after talking with any NPC
Originally posted by Ind
Fixed in [rev=15598]
Fixed in [rev=15598]
Originally posted by Napster
found bug when npc use script command input
mes "test input";
next; <---- INVALID_TIMER close;
input .@num;
if npc idle timer INVALID_TIMER
variable input save on player
click this npc again show debug in server & dialog npc notrespond
found bug when npc use script command input
mes "test input";
next; <---- INVALID_TIMER close;
input .@num;
if npc idle timer INVALID_TIMER
variable input save on player
click this npc again show debug in server & dialog npc notrespond
[DEBUG]: script: menu: script:menu: unexpected selection (0)
Edited by Napster, 18 February 2012 - 09:05 AM.
Originally posted by Wildcard
I can confirm the behavior described above. This is the script I needed to get both to work.
I have quick fixes for both, but it somehow feels to me like this whole "abort script" shebang should be properly encapsulated in a npc_ function, since it is done in more than one place and has a couple nontrivial cleanup to do, as can be seen in clif_parse_LoadEndAck:
I can confirm the behavior described above. This is the script I needed to get both to work.
mes "a"; menu "a:b",-; mes "a"; next; // let the timeout occur here while waiting for input, then close the input box and talk to the npc again for a total of 3 debug messages input .@num; mes "a"; close;
I have quick fixes for both, but it somehow feels to me like this whole "abort script" shebang should be properly encapsulated in a npc_ function, since it is done in more than one place and has a couple nontrivial cleanup to do, as can be seen in clif_parse_LoadEndAck:
// abort currently running script sd->state.using_fake_npc = 0; sd->state.menu_or_input = 0; sd->npc_menu = 0; if(sd->npc_id) npc_event_dequeue(sd);
Originally posted by Epoque
I believe a particular 'abort' code needs implementing to signal that the player's NPC code was terminated through the time-out feature. For instance, if the time-out occurs then the player's npc_id is reset to 0, and all instances of the script are destroyed. However, if the player then continues to type something into an input; command, the script engine doesn't perform any checks for a 'time-out terminated' clause, and will throw errors/debug messages.
clif.c:clif_parse_NpcAmountInput
npc.c:npc_scriptcont
We need some sort of signal flag or something to prevent this from occurring.
I believe a particular 'abort' code needs implementing to signal that the player's NPC code was terminated through the time-out feature. For instance, if the time-out occurs then the player's npc_id is reset to 0, and all instances of the script are destroyed. However, if the player then continues to type something into an input; command, the script engine doesn't perform any checks for a 'time-out terminated' clause, and will throw errors/debug messages.
clif.c:clif_parse_NpcAmountInput
int npcid = RFIFOL(fd,2); int amount = (int)RFIFOL(fd,6); sd->npc_amount = amount; npc_scriptcont(sd, npcid);
npc.c:npc_scriptcont
if( id != sd->npc_id ){ TBL_NPC* nd_sd=(TBL_NPC*)map_id2bl(sd->npc_id); TBL_NPC* nd=(TBL_NPC*)map_id2bl(id); ShowDebug("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).\n", nd_sd?(char*)nd_sd->name:"'Unknown NPC'", (int)sd->npc_id, nd?(char*)nd->name:"'Unknown NPC'", (int)id); return 1; }
We need some sort of signal flag or something to prevent this from occurring.
Originally posted by EvilPuncker
Any news on this, guys? btw seems like i'm the only one using that setting atm but since it is an official behavior it should be looked into still xd
@new issue
cutins doesn't disappear too!
Any news on this, guys? btw seems like i'm the only one using that setting atm but since it is an official behavior it should be looked into still xd
@new issue
cutins doesn't disappear too!
Edited by EvilPuncker, 11 May 2012 - 12:06 AM.
Originally posted by Ind
the client doesn't sign that the player closed the stuff its hard to tell .-.
the client doesn't sign that the player closed the stuff its hard to tell .-.
Originally posted by EvilPuncker
bump't'bump
we should remove this feature them if it no one is able to fix
bump't'bump
we should remove this feature them if it no one is able to fix
changed status to: Fixed
Thanks to malufett's suggestion I thought of something I think fixes this once and for all
Fixed in https://github.com/H...7ab2005c97d3714maybe this is how it works
we dont seem able to figure the way the client tells the server when a npc is closed.click npc - timer starts mes something...timer is now running next -> restart timer mes something...timer is now running <timer timeout> close <- issued next -> no moreso maybe 'next' just restart the timer and no more checking if it was close or not.just terminate timer and upon termination check if the player is still dealing with the npc then thats the time we issue 'close' command...