Blockland Forums > Modification Help
Nested objects screws up big time?
(1/1)
Truce:
Using this code:


--- Code: ---$test = new ScriptObject()
{
a = 1;
b = 2;
c = new ScriptObject()
{
d = 4;
e = new ScriptObject()
{
f = 6;
g = 7;
};
h = new ScriptObject()
{
i = 9;
j = new ScriptObject()
{
k = 11;
l = 12;
};
};
};
m = new ScriptObject()
{
n = new ScriptObject()
{
o = 15;
p = 16;
};
q = new ScriptObject()
{
r = 18;
s = 19;
};
};
};
--- End code ---

These four objects are produced:


--- Quote ---==>6750.dump();
Tagged Fields:
  E = "6750"
  f = "6"
  G = "7"

==>6751.dump();
Tagged Fields:
  c = "6751"
  h = "6751"
  j = "6751"
  k = "11"
  l = "12"

==>6752.dump();
Tagged Fields:
  N = "6752"
  o = "15"
  p = "16"

==>6753.dump();
Tagged Fields:
  m = "6753"
  q = "6753"
  R = "18"
  S = "19"

--- End quote ---

There should be eight objects, not four. Also, the fields are part of the wrong objects and in a few instances missing altogether. Some of the letters are randomly capitalized, too, although that isn't a big deal. Does anyone know why this happens? Is it just a bug in the Torque engine? (No syntax errors occured when exec'ing the above code.)

EDIT:
Naming the objects reveals it creates the third, fifth, seventh, and eighth objects, the ones without child objects.
Navigation
Message Index

Go to full version