I don't know how to use the /save command in- game, I get this error in console when I write /save
[10:36:27.318] [Error - TalkAction Interface]
[10:36:27.320] data/talkactions/scripts/save.luanSay
[10:36:27.321] Description:
[10:36:27.322] data/talkactions/scripts/save.lua:4: attempt to call global 'isNu
mber' (a nil value)
[10:36:27.323] stack traceback:
[10:36:27.325] data/talkactions/scripts/save.lua:4: in function <data/talkactio
ns/scripts/save.lua:3>
This is my save.lua file:
[10:36:27.318] [Error - TalkAction Interface]
[10:36:27.320] data/talkactions/scripts/save.luanSay
[10:36:27.321] Description:
[10:36:27.322] data/talkactions/scripts/save.lua:4: attempt to call global 'isNu
mber' (a nil value)
[10:36:27.323] stack traceback:
[10:36:27.325] data/talkactions/scripts/save.lua:4: in function <data/talkactio
ns/scripts/save.lua:3>
This is my save.lua file:
Code:
local savingEvent = 0
local function save(delay)
doSaveServer()
if(delay > 0) then
savingEvent = addEvent(save, delay, delay)
end
end
function onSay(cid, words, param, channel)
local tmp = tonumber(param)
if(tmp ~= nil) then
stopEvent(savingEvent)
save(tmp * 60 * 1000)
elseif(param == '') then
doSaveServer(false)
else
local tid = getPlayerByNameWildcard(param)
if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
else
doPlayerSave(tid)
end
end
return true
end