function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end
local t = string.explode(param, ",")
t[2] = tonumber(t[2])
if(not t[2]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return true
end
local pid = cid
if(t[1]) then
pid = getPlayerByNameWildcard(t[1])
if(not pid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
return true
end
end
doAddPoints(pid, t[2])
doPlayerSendTextMessage(cid, "You have added ".. t[2] .." points to ".. t[1])
return true
end
[2:26:22.140] [Error - TalkAction Interface]
[2:26:22.140] data/talkactions/scripts/addpoint.lua:onSay
[2:26:22.140] Description:
[2:26:22.140] (luaDoPlayerSendTextMessage) Player not found
[2:26:22.140] [Error - TalkAction Interface]
[2:26:22.140] data/talkactions/scripts/addpoint.lua:onSay
[2:26:22.140] Description:
[2:26:22.140] data/talkactions/scripts/addpoint.lua:27: attempt to concatenate g
lobal 'sender' (a nil value)
[2:26:22.140] stack traceback:
[2:26:22.140] data/talkactions/scripts/addpoint.lua:27: in function <data/talk
actions/scripts/addpoint.lua:1>