我在menu.lua中有这个
local db = require "databaseconnection"
...
local function onEndBtnRelease()
local thisandthat = db.getLoggedIn()
native.showAlert( "Corona SDK", thisandthat.." teststring", { "OK" } )
end
...
Run Code Online (Sandbox Code Playgroud)
这在databaseconnection.lua中
local function getLoggedIn()
print("Test")
--[[...
]]--
return "some data"
end
Run Code Online (Sandbox Code Playgroud)
我唯一想要的是String("some data")from getLoggedIn(),但我得到的只是一个错误:
...\corona\menu.lua:51:尝试调用字段'getLoggedIn'(零值)
永远不会达到外包.我正在研究Corona SDK和Sublime,所需的数据来自isLoggedIn()sqlite-request.我怎样才能达到这个功能?