Module:Bongolium500/learning: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
local p = {} --p stands for package
local p = {}
local test1 = {["first"] = "first2", ["second"] = "second2"}
 
local test2 = {}
function p.error( frame )
return nil * 5
function p.hello( frame )
test2[1] = test1["first"]
test2[test1["second"]] = test1["second"]
    return "Hello, world!"
end
end


return p
return p

Latest revision as of 22:10, 18 February 2023

Lua error at line 4: attempt to perform arithmetic on a nil value.


local p = {}

function p.error( frame )
	return nil * 5
end

return p