Use the length operator (#) instead of table.getn.
table.getn was deprecated in Lua 5.1 in favor of #, the length operator. See: http://www.lua.org/manual/5.1/manual.html#7.2
This commit is contained in:
parent
d548a78e55
commit
56893e9dcd
11 changed files with 19 additions and 19 deletions
|
@ -29,7 +29,7 @@ end
|
|||
do
|
||||
local opt = {}
|
||||
local pat = "[%s%c%p]*([%w]*)=([\"]?[%w%s_!@#$%%^&*()<>:;]+[\"]\?\.?)"
|
||||
for i = 2, table.getn(arg), 1 do
|
||||
for i = 2, #arg, 1 do
|
||||
string.gsub(arg[i], pat, function(name, value) opt[name] = value end)
|
||||
end
|
||||
if not arg[2] then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue