Module:Bongolium500/learning: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
No edit summary
Line 6: Line 6:
test2[1] = test1["first"]
test2[1] = test1["first"]
test2[test1["second"]] = test1["second"]
test2[test1["second"]] = test1["second"]
     return "Hello, world!"
     return test2[1] .. test2["second2"]
end
end


return p
return p

Revision as of 21:07, 14 November 2021

Script error: The function "error" does not exist.


local p = {} --p stands for package
local test1 = {["first"] = "first2", ["second"] = "second2"}
local test2 = {}
	
function p.hello( frame )
	test2[1] = test1["first"]
	test2[test1["second"]] = test1["second"]
    return test2[1] .. test2["second2"]
end

return p