Module:Bongolium500/learning: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(Created page with "local p = {} --p stands for package function p.hello( frame ) return "Hello, world!" end return p")
 
No edit summary
Line 1: Line 1:
local p = {} --p stands for package
local p = {} --p stands for package
 
local test1 = {["first"] = "first2", ["second"] = "second2"}
local test2 = {}
function p.hello( frame )
function p.hello( frame )
test2[1] = test1["first"]
test2[test1["second"]] = test1["second"]
     return "Hello, world!"
     return "Hello, world!"
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 "Hello, world!"
end

return p