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

When players say !frags i get a error i consol!

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
This is what i get!


[15/06/2009 23:42:33] data/talkactions/scripts/frags.lua:onSay

[15/06/2009 23:42:33] data/talkactions/scripts/frags.lua:6: attempt to call global 'getPlayerRedSkullTicks' (a nil value)
[15/06/2009 23:42:33] stack traceback:
[15/06/2009 23:42:33] data/talkactions/scripts/frags.lua:6: in function <data/talkactions/scripts/frags.lua:5>
 
Try this one :o


LUA:
local config = {
	fragTime = getConfigInfo('timeToDecreaseFrags')
}

function onSay(cid, words, param, channel)
	local amount = getPlayerRedSkullTicks(cid)
	if(amount > 0 and config.fragTime > 0) then
		local frags = math.floor((amount / config.fragTime) + 1)
		local remainingTime = math.floor(amount - (config.fragTime * (frags - 1)))

		local hours = math.floor(((remainingTime / 1000) / 60) / 60)
		local minutes = math.floor(((remainingTime / 1000) / 60) - (hours * 60))
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. frags .. " unjustified frag" .. (frags > 2 and "s" or "") .. ". The amount of unjustified frags will decrease after: " .. hours .. "h and " .. minutes .. "m.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified frags.")	
	end

	return TRUE
end
 
nope dont work! i get this insted:

[15/06/2009 23:57:17] Lua Script Error: [TalkAction Interface]
[15/06/2009 23:57:17] data/talkactions/scripts/frags.lua:onSay

[15/06/2009 23:57:17] data/talkactions/scripts/frags.lua:6: attempt to call global 'getPlayerRedSkullTicks' (a nil value)
[15/06/2009 23:57:17] stack traceback:
[15/06/2009 23:57:17] data/talkactions/scripts/frags.lua:6: in function <data/talkactions/scripts/frags.lua:5>
 
This is what i get!


[15/06/2009 23:42:33] data/talkactions/scripts/frags.lua:onSay

[15/06/2009 23:42:33] data/talkactions/scripts/frags.lua:6: attempt to call global 'getPlayerRedSkullTicks' (a nil value)
[15/06/2009 23:42:33] stack traceback:
[15/06/2009 23:42:33] data/talkactions/scripts/frags.lua:6: in function <data/talkactions/scripts/frags.lua:5>

haha, had same problem before.

delete the frags.lua

and let players use !kills instead

:thumbup:
 
Back
Top