Warning! This is the old Hercules bugtracker archive, and may not reflect the current state of Hercules. The current bugtracker is on GitHub Issues.
Issue information
Issue ID
#6936
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Nov 27, 2012 18:53
Last Post
Hercules Elf Bot
Nov 27, 2012 23:43
Confirmation
Yes (0)
No (3)
Hercules Elf Bot - Nov 27, 2012 18:53
Originally posted by [b]capuche[/b] Hello!
Using [color=#ff0000]r16821[/color] version+, when i store array values in [color=#0000ff].variable[][/color] on the Label [color=#0000ff]OnInit[/color] and [color=#0000ff]Duplicate[/color] the NPC, there are the same[color=#0000ff] .variable[][/color]'s[color=#0000ff] [/color]value double in the [color=#0000ff].variable[][/color] of 1 NPC.
There are the [color=#ff0000]same menu twice in the same NPC[/color]. Bug?
Hercules Elf Bot - Nov 27, 2012 20:11
Originally posted by [b]Euphy[/b] Duplicate NPCs share NPC variables. If it weren't for this, duplicates would not be much more efficient than normal scripts.
The reason you get a menu twice is because you don't initialize the [b].menu1$[/b] variable with [b]set .menu1$,"";[/b], and the OnInit label runs twice.