object.width problem that i am facing

Hi max here

I am facing a problem with the object.width function
see when i use the code

print(image.width) where image being an image object
it works fine
but
print(image_array[count].width)
the simulator gives an error saying unexpected symbol near ‘[’

this is causing problems for my project as i use image arrays
i use the CoronaSDK-2012.799.msi build
thankyou
[import]uid: 115284 topic_id: 25827 reply_id: 325827[/import]

This code is working fine in 799;
[lua]local image_array = {}

image_array[1] = display.newImage(“smile.png”, 0, 0)
image_array[2] = display.newImage(“smile.png”, 50, 0)
image_array[3] = display.newImage(“smile.png”, 100, 0)

local count = 1

print (image_array[count].width)[/lua]

If you show more of your own code it could help you get some answers.

Peach :slight_smile: [import]uid: 52491 topic_id: 25827 reply_id: 104433[/import]

I found the solution, I just had to close and open the simulator . after that it works fine and later when the problem arise i just do it again. But please do check into it.

Thanks [import]uid: 115284 topic_id: 25827 reply_id: 104577[/import]

If you file a bug report we can look into it, just be sure to provide specific info and a test case that we can run so we can try to reproduce the issue at our end.

Peach :slight_smile: [import]uid: 52491 topic_id: 25827 reply_id: 104602[/import]