Says it all…
Slightly anonymized, should be no trade secrets here…
[code]-- in main.lua
local function movePlayer(event)
helper.screenToGridPosition(map, event)
end
Runtime:addEventListener(“touch”, movePlayer)
– in otherfile-helper.lua
function helper:screenToGridPosition(map, location)
print("map = ", map, "location = ", location)
end[/code]
map comes up as a table (as expected)
location comes up as nil, instead of a table.
Any ideas? Am I somehow destroying some basic Lua principle here?
(The only thing I can think of is that maybe : is a way of forcing the second argument of any function to be …) [import]uid: 41884 topic_id: 28749 reply_id: 328749[/import]