Why does it becomes a nil value?

I keep getting errors about the “letter” a nil value

(letter.name was the error line)

I tried looking at the error in corona simulator output and it says “Failed to find image letters/uc/…png”

but i check the folder of my app and the folder “letter” is there, also the “uc” folder with the images inside

all named as it is “a, b ,c, … z”

anyone knows why i keep getting the error?

Thanks for any help

letter = display.newImageRect(“letters/uc/”… arr_str[i] …".png",30,30)
letter.name = arr_str[i]
letter.x = xPos; letter.y = yPos
letter.idBg = i
lettergroup:insert( letter)

Before your first line put:

print(arr\_str[i])

This will tell you what is being added to the filename string. I expect that you will discover that the array is not returning what you think it is. It’s hard to diagnose without knowing what the letter.name variable is.

Solved it thanks!

Before your first line put:

print(arr\_str[i])

This will tell you what is being added to the filename string. I expect that you will discover that the array is not returning what you think it is. It’s hard to diagnose without knowing what the letter.name variable is.

Solved it thanks!