rafoarc
07-12-2009, 09:26 PM
hello everyone,
I have a small problem when i try to run the following piece of code:
for j in 1 to nGen do
(
for i in 1 to nCells do
(
if (cellAuto[j][i] == 1) then
p = plane()
p.length = 1
p.width = 1
p.pos.x = i
p.pos.y = -j
)
)
I get "Unknown property: "length" in Plane". And when I change it to this :
...
p = plane length:1 width:1
move p [i,-j,0]
...
i get "No ""move"" function for undefined". Actually, i does work sometimes (?) when I run pieces of my code separately, but it doesn't work at all when i wrap it in a button. I assume that for some reason it considers p as an undefined variable... but i am not really sure...
thanks
I have a small problem when i try to run the following piece of code:
for j in 1 to nGen do
(
for i in 1 to nCells do
(
if (cellAuto[j][i] == 1) then
p = plane()
p.length = 1
p.width = 1
p.pos.x = i
p.pos.y = -j
)
)
I get "Unknown property: "length" in Plane". And when I change it to this :
...
p = plane length:1 width:1
move p [i,-j,0]
...
i get "No ""move"" function for undefined". Actually, i does work sometimes (?) when I run pieces of my code separately, but it doesn't work at all when i wrap it in a button. I assume that for some reason it considers p as an undefined variable... but i am not really sure...
thanks
