• 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!

Solved Strange Error in console

Naister

New Member
Joined
Feb 27, 2010
Messages
80
Reaction score
0
im getting this error:
Code:
[26/03/2010 22:42:09] [Error - CreatureScript Interface] 
[26/03/2010 22:42:09] data/creaturescripts/scripts/idle.lua:onThink
[26/03/2010 22:42:09] Description: 
[26/03/2010 22:42:09] data/creaturescripts/scripts/idle.lua:14: attempt to compare number with nil
[26/03/2010 22:42:09] stack traceback:
[26/03/2010 22:42:09] 	data/creaturescripts/scripts/idle.lua:14: in function <data/creaturescripts/scripts/idle.lua:6>
But only when i log with 1 character,
but the only 2 things i did before, were:
kill the monster to open tp: http://otland.net/f82/kill-monster-create-portal-71245/

and use this thing that creates tp but i used in myself, instead of in the ground to check it: http://otland.net/f81/create-escape-teleport-awesome-countdown-71626/

anyways if some one need my idle:
Code:
local config = {
	idleWarning = getConfigValue('idleWarningTime'),
	idleKick = getConfigValue('idleKickTime')
}

function onThink(cid, interval)
	if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or
		getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then
		return true
	end

	local idleTime = getPlayerIdleTime(cid) + interval
	doPlayerSetIdleTime(cid, idleTime)
	if(config.idleKick > 0 and idleTime > config.idleKick) then
		doRemoveCreature(cid)
	elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then
		local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes"
		if(config.idleKick > 0) then
			message = message .. ", you will be disconnected in "
			local diff = math.ceil((config.idleWarning - config.idleKick) / 60000)
			if(diff > 1) then
				message = message .. diff .. " minutes"
			else
				message = message .. "one minute"
			end

			message = message .. " if you are still idle"
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
	end

	return true
end

Thx beforehand
 
Last edited:
Back
Top