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

0.3.4pl2 błąd...

averatec

Advanced OT User
Joined
Jun 1, 2007
Messages
2,243
Solutions
4
Reaction score
160
Location
Poland
Witam,
W konsoli po śmierci gracza otrzymuję taki błąd:
Code:
Lua Script Error: [CreatureScript Interface] 
data/creaturescripts/scripts/playerdeath.lua:onDeath

luaGetCreatureName(). Creature not found

Lua Script Error: [CreatureScript Interface] 
data/creaturescripts/scripts/playerdeath.lua:onDeath

luaGetCreatureName(). Creature not found
Czy to jest normalne?

Także mam problem z opuszczaniem domków:
Code:
Lua Script Error: [TalkAction Interface] 
data/talkactions/scripts/leavehouse.lua:onSay

luaGetHouseOwner(). House not found

Lua Script Error: [TalkAction Interface] 
data/talkactions/scripts/leavehouse.lua:onSay

luaGetHouseOwner(). House not found

Za pomoc oczywiśćie rep++ :)
 
Spróbuj tego :

1. Leavehouse

Code:
function onSay(cid, words, param, channel)
	if getTileHouseInfo(getPlayerPosition(cid)) ~= FALSE then
		if getHouseOwner(getTileHouseInfo(getPlayerPosition(cid))) == getPlayerGUID(cid) then
			setHouseOwner(getTileHouseInfo(getPlayerPosition(cid)), 0)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have successfully left your house.")
		else
			doPlayerSendCancel(cid, "You are not the owner of this house.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You are not inside a house.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
	end

	return TRUE
end

2. Playerdeath

Code:
local config = {
	deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')),
	sqlType = getConfigInfo('sqlType'),
	maxDeathRecords = getConfigInfo('maxDeathRecords')
}

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if getPlayerSlotItem(cid, 2).itemid == 2173 then
                doPlayerRemoveItem(cid, 2173, 1)
end  

config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
	if(config.deathListEnabled ~= TRUE) then
		return
	end

	local hitKillerName = "field item"
	local damageKillerName = ""
	if(lastHitKiller ~= FALSE) then
		if(isPlayer(lastHitKiller) == TRUE) then
			hitKillerName = getPlayerGUID(lastHitKiller)
		else
			hitKillerName = getCreatureName(lastHitKiller)
		end

		if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
			if(isPlayer(mostDamageKiller) == TRUE) then
				damageKillerName = getPlayerGUID(mostDamageKiller)
			else
				damageKillerName = getCreatureName(mostDamageKiller)
			end
		end
	end

	db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
	local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
	if(rows:getID() ~= -1) then
		local amount = rows:getRows(true) - config.maxDeathRecords
		if(amount > 0) then
			if(config.sqlType == DATABASE_ENGINE_SQLITE) then
				for i = 1, amount do
					db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
				end
			else
				db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
			end
		end
	end
end

Oczywiście niektóre realoady mogą nie działać.
 
Błąd z playerdeath polega na tym iż ludzie noszą Amulet of Loss, tak?

Leavehouse który podałeś jest identyczny jak orginalny leavehouse.
 
Błąd z playerdeath polega na tym iż ludzie noszą Amulet of Loss, tak?

Leavehouse który podałeś jest identyczny jak orginalny leavehouse.

Nie mam żadnych problemów z playerdeath nawet z aolem.

Leavehouse działa perfekcyjnie, nie podałeś ze masz z pl2 więc dlatego Ci podałem.
 
Nie mam żadnych problemów z playerdeath nawet z aolem.

Leavehouse działa perfekcyjnie, nie podałeś ze masz z pl2 więc dlatego Ci podałem.

jak nie podałem?!
pzrecież temat jest 0.3.4pl2....
 
tez tak mam nie sprawia to broblemów ale w konsoli czasami się wyświetla może jak ktoś ma full blessy i kupi jeszcze aola to to sie chyba wyświetla bo nic nie powinno spaść ale aol zawsze spada bo ma 1 harges left na deda.
 
No i co, nikt nie wie co jest przyczyną tak długiego biniary save?
 
#elf
Mogłbyś podać jak skonfigurować mysql pod tfs 0.3?
Wiem, że to wina mysql, bo procesor strasznie długo coś tam z mysql kombinuję przy save.
 
Back
Top