Search results
Results from the WOW.Com Content Network
The-- compress option compresses the table so that it can be iterated over with-- ipairs.-----function p. numData (t, compress) checkType ('numData', 1, t, 'table') checkType ('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs (t) do local prefix, num = mw. ustring. match (tostring (k), '^([^0-9]*)([1-9][0-9]*)$') if num ...
The functioncall is written as some.function.name(a,b,c) where some.function.name means something in the Extension:Scribunto/Lua reference manual and a,b,c are the arbitrary variable names you've chosen.
This module includes a number of set operations for Lua tables. It currently has union, intersection and complement functions for both key/value pairs and for values only. . It is a meta-module, meant to be called from other Lua modules, and should not be called directly from #invo
The-- compress option compresses the table so that it can be iterated over with-- ipairs.-----function p. numData (t, compress) checkType ('numData', 1, t, 'table') checkType ('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs (t) do local prefix, num = mw. ustring. match (tostring (k), '^([^0-9]*)([1-9][0-9]*)$') if num ...
Also, we keep a record-- in the metatable of when pairs and ipairs have been called, so we do not-- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable . __index = function ( t , key ...
Also, we keep a record-- in the metatable of when pairs and ipairs have been called, so we do not-- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable . __index = function ( t , key ...
Mr. Stradivarius: I discovered that calling ipairs() on args and then breaking out of the loop early will unnecessarily result in all of the numeric arguments being expanded, instead of just the ones that were iterated over. I added a test case for this and implemented a fix in the sandbox.
The behaviour of ipairs is undefined if nil values are present, so we need to make sure they are all removed. args = type (args) == 'table' and args or {} local portals = {} local namedArgs = {} for k, v in pairs (args) do if type (k) == 'number' and type (v) == 'string' then-- Make sure we have no non-string portal names. table.insert (portals ...