Probably the easiest question presented here in a long time, but i’ve googled quite a bit, and not one mention of my problem. This means it’s definately me screwing things up. Always a comforting thought!
Anyway, i just started developing for corona, and in lua. I like it thus far (i’ve got an extensive background in PHP and JS coding), but hit a snag that i just don’t understand.
I’ve got a main.lua wich requires a module i’ve made and required.
The module consists of a single function that i intend to use often (so that’s why it’s in an external module, to keep things tidy).
The bare essential of my problem is (not actual code):
– main.lua
local f = require “functions”
f(‘please write this’)
– functions.lua
module(…, package.seeall)
function test(id)
print(id)
end
As to my (admitted, limited) knowledge this is supposed to just print “please write this” to the debug screen. Instead, it prints table#.
What gives? Why is my string converted to a table? Every tutorial or lua function explanation tells me this should just work…
So, please, have a good laugh, an provide me with the answer [import]uid: 53467 topic_id: 28575 reply_id: 328575[/import]