local aliaslist={
[1] = {enable=true,
group="common",
label="common",
alias_rex=rex.new("^Install$"),
alias_func=function () aliases.install(match) return true end
}
}
function aliasline(input)
local bool = false
for id, v in ipairs(aliaslist) do
if aliaslist[id]["enable"] == true then
local match
_, _, match = aliaslist[id].alias_rex:tfind(input)
if match then
bool = aliaslist[id]['alias_func'](match)
return bool
end --if
end --if
end -- for
end -- aliasline
i ran this code.. and it gave the error like this:
[ILua]: ./trigger.lua:36: bad argument #1 to 'tfind' (string expected, got table)
Traceback:
[C]:-1: in function 'tfind'
./trigger.lua:36: in function 'aliasline'
lusternia.lua:19: in a Lua function
Error in the 'client_aliases' callback.
so.. basically i am not good at table thing.. but.. i hope to find solution to this problem soon. thanks!