Issue information

Issue ID
#2640
Status
Duplicate
Severity
None
Started
Hercules Elf Bot
Jan 7, 2009 22:43
Last Post
Hercules Elf Bot
Jan 7, 2009 22:43
Confirmation
N/A

Hercules Elf Bot - Jan 7, 2009 22:43

Originally posted by [b]NoH[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2640

Using a script such as:

CODE
attachrid .var; // (or any kind of variable actually)
input @var;


or:

CODE
attachrid .var;
menu "1",-,"2",-;


or:

CODE
attachrid .var;
next;
mes "Hello";


will bug the emulator and print an error message:

QUOTE
[Debug]: npcscriptcont: 'Unknown NPC' (sd->npc_id=0) is not <NPC name> (id=<GID of the NPC>).


and the script will stop. However (thanks Keyword for the tip):

CODE
attachrid .var;
doevent strncpinfo(0) + "::OnPlayerIsAttached";
end;

OnPlayerIsAttached:
input @var;


fixes the problem.

EDIT - Actually doevent and donpcevent don't seem to accept variables in the latest trunk releases (could be another bug report, isn't it?), but "cmdothernpc" does and can be used here instead.

This post has been edited by NoHealing: Jan 7 2009, 07:15 PM