Olá pessoal , estou com esse erro chatinho :C , esse arquivo é um "mod" com varias talk,action,etc. eu tentei usar no notice pelo talkaction , mas da um erro "enought memory" ai optei em usar o do mod e acontece isso quando usa o comando , fico grato desde ja
[Error - TalkAction Interface]
domodlib('news-config')
local config = {
added = added,
cleaned = cleaned
}
function onSay(cid, words, param, channel)
if(not checkExhausted(cid, 666, 10)) then
return false
end
local t = string.explode(param, ",")
if(table.isStrIn(param, config.add)) then
if getPlayerGroupId (cid) > 3 then
file = io.open('data/txt/notice.txt','a+')
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
notice = file:write("\n"..getPlayerName(cid).." at " .. os.date("%d %B %Y - %X ", os.time()) .."\n"..t[2].."\n")
file:close()
return true
end
elseif(table.isStrIn(param, config.clean)) then
if getPlayerGroupId (cid) > 3 then
file = io.open('data/txt/notice.txt','w')
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
notice = file:write("Server News:\n")
file:close()
return true
end
return false
end
file = io.open('data/txt/notice.txt','r')
notice = file:read(-1)
doShowTextDialog(cid, 7528, notice)
file:close()
return true
end
:onSay
Description:
data/lib/012-table.lua:40: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
data/lib/012-table.lua:40: in function 'isStrIn'
[string "LuaInterface::loadBuffer"]:14: in function <[string "LuaInterface::loadBuffer"]:8>
[Error - TalkAction Interface]
domodlib('news-config')
local config = {
added = added,
cleaned = cleaned
}
function onSay(cid, words, param, channel)
if(not checkExhausted(cid, 666, 10)) then
return false
end
local t = string.explode(param, ",")
if(table.isStrIn(param, config.add)) then
if getPlayerGroupId (cid) > 3 then
file = io.open('data/txt/notice.txt','a+')
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
notice = file:write("\n"..getPlayerName(cid).." at " .. os.date("%d %B %Y - %X ", os.time()) .."\n"..t[2].."\n")
file:close()
return true
end
elseif(table.isStrIn(param, config.clean)) then
if getPlayerGroupId (cid) > 3 then
file = io.open('data/txt/notice.txt','w')
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
notice = file:write("Server News:\n")
file:close()
return true
end
return false
end
file = io.open('data/txt/notice.txt','r')
notice = file:read(-1)
doShowTextDialog(cid, 7528, notice)
file:close()
return true
end
:onSay
Description:
data/lib/012-table.lua:40: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
data/lib/012-table.lua:40: in function 'isStrIn'
[string "LuaInterface::loadBuffer"]:14: in function <[string "LuaInterface::loadBuffer"]:8>