B??d Silnik

noobson1

Advanced User
Zarejestrowany
Dołączył
Listopad 2, 2008
Posty
479
Liczba reakcji
13
Witam mam problem po kilku minutach grania co jakis czas wyskakuje b??d w silniku
12/02/2010 17:00:24] Lua Script Error: [CreatureScript Interface]
[12/02/2010 17:00:24] in a timer event called from:
[12/02/2010 17:00:24] data/creaturescripts/scripts/inquisitionPortals.lua:onDeath

[12/02/2010 17:00:24] luaGetThingFromPos(). Tile not found


uzywam tfs 0.3.5 wzamian za pomoc Reput :)
 
Odp: B??d Silnik

poka? skrypt inquisitionPortals.lua. W nim masz b??d.

Pozdrawiam
 
Odp: B??d Silnik

Usu? plik inquisitionPortals.lua, poniewa? masz w nim b??d. Chyba, ?e kto? pomo?e Ci go naprawi?.

Pozdrawiam,
Death II.
 
Odp: B??d Silnik

@up
Na pewno usuwaj?c plik wszystko b?dzie dobrze. :)

@topic
Z tego co widz? po prostu nie posiada on funkcji onDeath. a b??d luaGetThingFromPos() jest tylko skutkiem przerwania skryptu. Chyba ?e jest po prostu ?le napisany. Je?eli chcesz u?yj tego:

PHP:
local config = {
	message = "Go into the teleporter in 3 minutes, else it will disappear.",
	timeToRemove = 180, -- seconds
	teleportId = 1387,
	bosses = { -- Monster Name, Teleport To Position, Teleport Position
		["Ushuriel"] = { { x = 637, y = 478, z = 13 }, { x = 255, y = 352, z = 12, stackpos = 1 } },
		["Annihilon"] = { { x = 382, y = 525, z = 13 }, { x = 637, y = 463, z = 13, stackpos = 1 } },
		["Hellgorak"] = { { x = 117, y = 20, z = 8 }, { x = 335, y = 572, z = 10, stackpos = 1 } },
		["Madareth"] = { { x = 505, y = 350, z = 13 }, { x = 340, y = 453, z = 13, stackpos = 1 } },
		["Zugurosh"] = { { x = 340, y = 466, z = 13 }, { x = 398, y = 526, z = 13, stackpos = 1 } },
		["Latrivan"] = { { x = 335, y = 589, z = 10 }, { x = 505, y = 339, z = 13, stackpos = 1 } }
	}
}

local function removal(position)
	if getThingfromPos(position).itemid == config.teleportId then
		doRemoveItem(getThingfromPos(position).uid)
	end
	return TRUE
end

function onDeath(cid, corpse, killer)
	local position = getCreaturePosition(cid)
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(cid) then
			teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, pos[2])
		end
	end
	return TRUE
end

+ creaturescripts.xml

PHP:
<event type="death" name="Inquisition" script="inquisition.lua"/>

Ale b?dziesz musia? jeszcze doda?:
PHP:
<script>
	<event name="Inquisition"/>
</script>
do ka?dego z boss?w.
 
Back
Do góry