Issue information

Issue ID
#5675
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Apr 30, 2012 9:52
Last Post
Hercules Elf Bot
May 9, 2012 7:34
Confirmation
N/A

Hercules Elf Bot - Apr 30, 2012 9:52

Originally posted by [b]Senshuken[/b]
Client: 2010-12-28
SVN: 16010

Running this

[CODE]
- script test -1,{
OnWhisperGlobal:
set var1, var2;
dispbottom "Set var1 to var2";
set var1, .var2;
dispbottom "Set var1 to .var2";
set var1, $var2;
dispbottom "Set var1 to $var2";
end;
}
[/CODE]

Outputs this on the console

[CODE]
[Error]: script:copyarray: illegal scope
[Debug]: Data: variable name='var1'
[Debug]: Data: variable name='$var2' index=0
[Debug]: Source (NPC): test (invisible/not on a map)
[/CODE]


And running this

[CODE]
- script test -1,{
OnWhisperGlobal:
set var1, var2;
dispbottom "Set var1 to var2";
set var1, .var2;
dispbottom "Set var1 to .var2";
set var1, $var2;
dispbottom "Set var1 to $var2";
end;
}
[/CODE]

Outputs this

[CODE]
[Error]: script:copyarray: illegal scope
[Debug]: Data: variable name='var1'
[Debug]: Data: variable name='.var2' index=0
[Debug]: Source (NPC): test (invisible/not on a map)
[/CODE]

Any idea why it's doing it? Am I not allowed to set different type of variables to player bounded variables?

This post has been edited by Senshuken on Apr 30, 2012 9:53

Hercules Elf Bot - Apr 30, 2012 10:12

Originally posted by [b]Nameless2you[/b]
What should be noted to this is neither
[CODE]set var,$var;[/CODE] work nor
[CODE]var = $var;[/CODE]

however apparently (poster said so in irc)
[CODE]set var, 0 + $var;[/CODE] works

This post has been edited by Nameless2you on Apr 30, 2012 10:13

Hercules Elf Bot - Apr 30, 2012 12:19

Originally posted by [b]Epoque[/b]
Seems to be an issue with the set; added functionality of being able to call copyarray when assigning an array to an array. I will temporarily remove this functionality until better behaviour can be defined (better method for determining if the new value is an array variable.)

Should be resolved in [rev='16017'].

This post has been edited by Epoque on Apr 30, 2012 12:23