For some reason, my function always thinks the first parameter is a Table.
The file is functions.lua
local M = {}
local testfunction = function(param1, param2)
print ("param1", param1)
print ("param2", param2)
end
M.testfunction = testfunction
return M
But then to use this, I have to do the following:
local funcs = require "functions"
...
funcs:testfunction("test 1", "test 2")
--[[
Output is:
param1 table0FF34
param2 test 1
]]--
OK, so I can actually do the following HACK to get it to work:
local M = {}
local testfunction = function(param1, param2, param3)
print ("param2", param2)
print ("param3", param3)
end
M.testfunction = testfunction
return M
Then:
local funcs = require "functions"
...
funcs:testfunction("test 1", "test 2")
--[[
Output is:
param2 test 1
param3 test 2
]]--
Is this supposed to happen? Is this a bug? Do I not know something about LUA or Corona that I should that is causing this?
Please help, I’d hate to continue forward with a weird hack in my code
[import]uid: 85633 topic_id: 14809 reply_id: 314809[/import]
