a_poster_pos = CreateObject("roAssociativeArray")
' l_x and l_y are incremented in a loop
position = {}
position["x"] = l_x;
position["y"] = l_y;
a_poster_pos.Append(position);
a_poster_pos = []
' l_x and l_y are incremented in a loop
position = []
position.Push(l_x)
position.Push(l_y)
a_poster_pos.Push(position)
a_poster_pos = []
' l_x and l_y are incremented in a loop
position = []
position.Push(l_x)
position.Push(l_y)
a_poster_pos.Push(position)
for each coordinate in a_poster_pos
print "x : ";coordinate[].x
print "y : ";coordinate[].y
end for
a_poster_pos = []
' l_x and l_y are incremented in a loop
a_poster_pos.Push({x: l_x, y: l_y})
for each coordinate in a_poster_pos
print "x : ";coordinate.x
print "y : ";coordinate.y
end for
for each coordinate in a_poster_pos
print "x : ";coordinate[0]
print "y : ";coordinate[1]
end for
Type Mismatch. (runtime error &h18) in pkg:/source/main.brs(95)
095: print "x : ";coordinate[0]
"coredump" wrote:
I get a type mismatch with that for loop at this line :
Type Mismatch. (runtime error &h18) in pkg:/source/main.brs(95)
095: print "x : ";coordinate[0]
print coordinateto see if it actually prints out some array items.
print type (coordinate)
"Komag" wrote:for each coordinate in a_poster_pos
print "x : ";coordinate[0]
print "y : ";coordinate[1]
end for
No need to use an AA, just adds what appears to be unnecessary complexity, unless it's more clear to you that way to have the x and y labels written there every time, then go ahead
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!