• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

/save doesnt work :S

Axelor

Member
Joined
Sep 2, 2010
Messages
505
Reaction score
9
hiho,
my save doesnt work.
only auto save does work. But I also want to save on my own with the GOD acces command /save,
but when I insert /save

I get this error on console
PHP:
[20:0:28.657] data/talkactions/scripts/save.lua:4: attempt to call global 'isNumber' (a nil value)
[20:0:28.657] stack traceback:
[20:0:28.657]   data/talkactions/scripts/save.lua:4: in function <data/talkactions/scripts/save.lua:2>

this is my save.lua
PHP:
-- [( Script edited by: DoidinMapper )] --
function onSay(cid, words, param, channel)
local saving = 0
if(isNumber(param)) then
stopEvent(saving)
save(tonumber(param) * 60 * 1000)
else
doSaveServer()
end
return true
end
function save(delay)
doSaveServer()
if(delay > 0) then
saving = addEvent(save, delay, delay)
end
end


someone can help?

thanks in advance,

repp+
 
Last edited:
LUA:
local savingEvent = 0

function onSay(cid, words, param, channel)
	if(isNumber(param)) then
		stopEvent(savingEvent)
		save(tonumber(param) * 60 * 1000)
	else
		doSaveServer()
	end
	return true
end

function save(delay)
	doSaveServer()
	if(delay > 0) then
		savingEvent = addEvent(save, delay, delay)
	end
end
 
LUA:
local savingEvent = 0

function onSay(cid, words, param, channel)
	if(isNumber(param)) then
		stopEvent(savingEvent)
		save(tonumber(param) * 60 * 1000)
	else
		doSaveServer()
	end
	return true
end

function save(delay)
	doSaveServer()
	if(delay > 0) then
		savingEvent = addEvent(save, delay, delay)
	end
end

omg this one shutted my server down -.-
 
Back
Top