Working fine on the emulator but wrong behaviour on android

Hi, i'm experiencing an strange behaviour. It seems that the lua interpreter is not the same on the emulator than on the android.
My game is playing fine on the emulator. I have simple physics, with very little animations. I'm not using nothing strange at all.
I had an XML file ( using a xml parser from some page about corona) and it was working fine. But something was wrong on android. It doesn't worl. I had to rename the Level001.xml to Level001.txt, and then it was ok!!!
Then i added some fields on the xml. It worked on the emulator but not on the android. I had to change the XML format to a simple TXT format and rewrite the importer.
I had an issue with the txt importer too. I write a # character to indicate EOF. It seems that when you read a line on the emulator is not the same that on the android, because:

1
2
linea=hFile:read("*l")
if linea=="#" then return end

I've solved the problem. Seems that calling to string.gmatch multiple times every frame 'collapses' the runtime :(

I've changed the code, converted first to a table, and then access to the table and it's ok, now it's worlong on my mobile.

views:1384 update:2011/12/31 9:35:10
corona forums © 2003-2011