Fandom Developers Wiki
Advertisement

Helper module to get values from data modules.

Description[]

Reads data values such as from the module below:

--Module:data/testdata
return {
    ["key1"]={["key2"]={["key3"]="testvalue1"}},
    ["test1"]={["test2"]={["test3"]="testvalue"}},
}

Syntax[]

  • {{#invoke:Data|main|<Module:Name>|<...>}}
  • {{#invoke:Data|<Module:Name>|<...>}}

Examples[]

CodeOutput
{{#invoke:Data|main|Module:data/testdata|key1|key2|key3}}testvalue1
CodeOutput
{{#invoke:Data|main|Module:data/testdata|test1|test2|test3}}testvalue
CodeOutput
{{#invoke:Data|Module:data/testdata|key1|key2|key3}}testvalue1
CodeOutput
{{#invoke:Data|Module:data/testdata|test1|test2|test3}}testvalue

Documentation[]

Package items[]

data.load(modName, args) (function)
Parameters:
  • modName (string; optional)
  • args (sequence)
    • args[1] If modName is absent, then this is modName (string)
Returns: (any)
data.main(frame) (function)
Parameter: frame (Frame)

Advertisement