• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Talkaction problem

valivan601

New Member
Joined
Apr 13, 2011
Messages
365
Reaction score
1
[Warning - TalkAction::loadFunction] Function "addskill" does not exist.

anyone can help me?

Code:
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, ",")
	if(not t[2]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")
		return true
	end

	local pid = getPlayerByNameWildcard(t[1])
	if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
		return true
	end

	t[2] = t[2]:lower()
	local skill = SKILL_IDS[t[2]]
	if(not skill) then
		local tmp = t[2]:sub(1, 1)
		if(tmp == 'l' or tmp == 'e') then
			skill = SKILL__LEVEL
		elseif(tmp == 'm') then
			skill = SKILL__MAGLEVEL
		else
			skill = tonumber(t[2])
			if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.")
				return true
			end
		end
	end

	local amount = tonumber(t[3])
	if(not amount or amount == 0) then
		amount = 1
	end

	doPlayerAddSkill(pid, skill, amount, true)
	return true
end
 
i dont have a .lua file for addskill can anyone post it for me?

i hate talkactions problems i always stay silent. :mad:
 
Last edited:
[Warning - TalkAction::loadFunction] Function "addskill" does not exist.

anyone can help me?

Code:
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, ",")
	if(not t[2]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")
		return true
	end

	local pid = getPlayerByNameWildcard(t[1])
	if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
		return true
	end

	t[2] = t[2]:lower()
	local skill = SKILL_IDS[t[2]]
	if(not skill) then
		local tmp = t[2]:sub(1, 1)
		if(tmp == 'l' or tmp == 'e') then
			skill = SKILL__LEVEL
		elseif(tmp == 'm') then
			skill = SKILL__MAGLEVEL
		else
			skill = tonumber(t[2])
			if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.")
				return true
			end
		end
	end

	local amount = tonumber(t[3])
	if(not amount or amount == 0) then
		amount = 1
	end

	doPlayerAddSkill(pid, skill, amount, true)
	return true
end
Isn't this the skill? lol
 
bullseye! hahauahauh im retarded

if i just change value to script it will work?

<talkaction log="yes" words="/addskill" access="4" event="function" script="skill.lua"/>
 
Back
Top