weird string problem

hi everyone,
I have a strange problem with strings. Using corona in windows everything works fine, but when I load main.lua in Mac something happen to string concatenation. I read the file name from a txt file and use it to get the full path to image location, for example, after reading the string “test1” I use it to get the following one:

local path = “image/otherFolder/” … theString … “.png”

Corona say that can’t find the image:

.png)NG: Failed to find image (image/otherfolder…" …

It seems that “.png” string is concatenated in a wrong location

I used “…” and string.format(%s…) both won’t works. May be a problem due to big/little endian?

Thanks,
Alex

[import]uid: 76885 topic_id: 25875 reply_id: 325875[/import]

Can you post the full error message corona outputs please? [import]uid: 84637 topic_id: 25875 reply_id: 104676[/import]

sure here it is:
.png)NG: Failed to find image(images\bkg\bkg1
Runtime error
/Users/alex/Desktop/game/image.lua:32: attempt to index local ‘temp’ (a nil value)
stack traceback:
[C]: ?
/Users/alex/Desktop/game/image.lua:32: in function ‘New’


lots of rows like the previous one

the temp value is something I use, the problem is that corona can’t find the image bkg1.png even it’s already in the folder (no problem with corona in Win 7 with the same game)
Edit:

  • if I specify the path manually in the code by:
    loadImage(“image/otherFolder/hello.png”)
    then the image load correctly…
  • if I specify the string by concatenating different pieces like:
    local path = “images/otherFolder/” … someString … “.png”
    then it won’t work, but strings seems to be the same as print output the same complete path.

Thanks [import]uid: 76885 topic_id: 25875 reply_id: 104735[/import]