Hi!
Here’ s my source
local path = system.pathForFile("appleBox.db", system.DocumentsDirectory); db = sqlite3.open( path ); local tablesetup = [[CREATE TABLE IF NOT EXISTS appleBox\_Run (id INTEGER PRIMARY KEY, value);]] db:exec( tablesetup ) for row in db:nrows("SELECT \* FROM appleBox\_Run Where id = 1") do print("why i can't get here?") if ((row.value == null) or (row.value == "")) then local insertQuery = [[INSERT INTO appleBox\_Run VALUES (1, 0);]] db:exec( insertQuery ) end end local tablegameCore = [[CREATE TABLE IF NOT EXISTS appleBox\_Core (id INTEGER PRIMARY KEY autoincrement, point);]] db:exec( tablegameCore ) Play = display.newImage( "\_img/play.png",400, 710, true) for row in db:nrows("SELECT value FROM appleBox\_Run Where id = 1") do print("and here"); if row.value == 0 then Play.touch = StartFirstPlay; end if row.value == 1 then Play.touch = StartPlay; end end
when i touch Play button nothing happen, even mu console log does’n appear. Any ideas why it may happen?
Thanks for sugesttion in advice