Module
WorldSwitch
From Dogcraft Wiki
{{#invoke:WorldSwitch|subworld|Survial 4|Husky}}
generates: Script error: The module returned a nil value. It is supposed to return an export table.
{{#invoke:WorldSwitch|world|Survial 4|Husky}}
generates: Script error: The module returned a nil value. It is supposed to return an export table.
local p = {} --p stands for package
function p.subworld(frame)
input = mw.ustring.lower(frame[1] .. frame[2])
subworlds = {"husky", "beagle", "akita", "corgi", "labrador", "shepherd"}
for key,value in ipairs(subworlds) do
if (mw.ustring.find(input, value, 1, true) ~= nil) then
return value
end
end
end
This page was last modified on 22 May 2022, at 22:37. (3 months ago)