Difference between revisions of "Talk:Set"

Jump to navigation Jump to search
1,448 bytes added ,  16:56, 24 May 2008
no edit summary
imported>Haama
(Line limit)
imported>QQuix
Line 40: Line 40:


Set seems to have a [http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=820323&view=findpost&p=11981740 line limit of 73 bytes].
Set seems to have a [http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=820323&view=findpost&p=11981740 line limit of 73 bytes].
== Weird behavior from the “Set” function.  ==
Hi!  I am not sure here is the correct place to put this question, but it looks like it has to do with the “Set” function
The code is as follows:
;Status at this point-  ContainerA has ItemA – ContainerB has ItemB
set ContainerA to 0    ;  result is the same with/without this line
set ContainerA to ContainerB
set item to ContainerA.GetInventoryObject 0
PrintToConsole "Cont A – Item 0= %n"  Item ;Prints: “Cont A – Item 0 = ItemA” << Wrong
set item to ContainerA.GetInventoryObject 0
PrintToConsole "Cont A Item 0= %n"  Item ;Prints: “Cont A – Item 0 = ItemA” << Wrong
set item to ContainerB.GetInventoryObject 0 ; (*)
PrintToConsole "Cont B – Item 0= %n"  Item ;Prints: “Cont B – Item 0 = ItemB”
set item to ContainerA.GetInventoryObject 0
PrintToConsole "Cont A – Item 0= %n"  Item ;Prints: “Cont A – Item 0 = ItemB” << Now OK!!!
(*) – could be any other reference to ContainerB, like “set NumItems to ContainerB.getnumitems”
It looks that the “set ContainerA to ContainerB” does not set ContainerA  until I explicitly ref ContainerB
I have some complex code before that (and may be doing something wrong there) but, even so, this behavior doesn’t look right.
Does anybody have any reasonable explanation? Or any hint on what may be causing this?
Thanks in advance. --[[User:QQuix|QQuix]] 16:00, 24 May 2008 (EDT)
Anonymous user

Navigation menu