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

TFS 0.3.4 pl2 - bledy w konsoli

Dzanar2

New Member
Joined
Mar 14, 2008
Messages
78
Reaction score
1
Location
/dev/null
Witam w konsoli pojawiaja sie mi nastepujace bledy. Pojawiaja sie one wtedy kiedy player wchodzi na ta kratke kolo depo co powinno pokazywac ilosc jego itemow w depo.
Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/tiles.lua:onStepIn

data/movements/scripts/tiles.lua:118: attempt to call global 'getPlayerLookPos' (a nil value)
stack traceback:
        data/movements/scripts/tiles.lua:118: in function <data/movements/scripts/tiles.lua:10>
Zna ktos jakies rozwiazanie?
 
wpisz w kratce 0 na dole i u góry 0 bo tera jest automatik ^^:D


tak chodzi o action i uni. maja byc na 0 ja tak mam i problemow nie mam.
 
Last edited:
w jaka kratke u gory i na dole 0? nie rozumie? chodzi ci o action i unique id? jezeli tak to nie maja ustawione ani action ani unique id.
 
Sprobuj ten tiles:
Lua:
local config = {
	maxLevel = getConfigInfo('maximumDoorLevel')
}

local increasingItems = {[416] = 417, [426] = 425, [446] = 447, [3216] = 3217, [3202] = 3215}
local decreasingItems = {[417] = 416, [425] = 426, [447] = 446, [3217] = 3216, [3215] = 3202}
local depots = {2589, 2590, 2591, 2592}

local checkCreature = {isPlayer, isMonster, isNpc}
function onStepIn(cid, item, position, fromPosition)
	if(not increasingItems[item.itemid]) then
		return FALSE
	end

	if(isPlayer(cid) ~= TRUE or isPlayerGhost(cid) ~= TRUE) then
		doTransformItem(item.uid, increasingItems[item.itemid])
	end

	if(item.actionid >= 194 and item.actionid <= 196) then
		local f = checkCreature[item.actionid - 193]
		if(f(cid) == TRUE) then
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(item.actionid >= 191 and item.actionid <= 193) then
		local f = checkCreature[item.actionid - 190]
		if(f(cid) ~= TRUE) then
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(isPlayer(cid) ~= TRUE) then
		return TRUE
	end

	if(item.actionid == 189 and isPremium(cid) ~= TRUE) then
		doTeleportThing(cid, fromPosition, FALSE)
		doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)

		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
		return TRUE
	end

	local gender = item.actionid - 186
	if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender) == TRUE) then
		local playerGender = getPlayerSex(cid)
		if(playerGender ~= gender) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	local skull = item.actionid - 180
	if(skull >= 0 and skull < 6) then
		local playerSkull = getCreatureSkullType(cid)
		if(playerSkull ~= skull) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	local group = item.actionid - 150
	if(group >= 0 and group < 30) then
		local playerGroup = getPlayerGroupId(cid)
		if(playerGroup < group) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	local vocation = item.actionid - 100
	if(vocation >= 0 and vocation < 50) then
		local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
		if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(item.actionid >= 1000 and item.actionid <= config.maxLevel) then
		if(getPlayerLevel(cid) < item.actionid - 1000) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
			doTeleportThing(cid, fromPosition, FALSE)
			doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		end

		return TRUE
	end

	if(item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) <= 0) then
		doTeleportThing(cid, fromPosition, FALSE)
		doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)

		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
		return TRUE
	end

	if(getTileInfo(position).protection) then
		local depotPos, depot = getPlayerLookPos(cid), {}
		depotPos.stackpos = STACKPOS_GROUND
		while(true) do
			depotPos.stackpos = depotPos.stackpos + 1
			depot = getThingFromPos(depotPos)
			if(depot.uid == 0) then
				break
			end

			if(isInArray(depots, depot.itemid) == TRUE) then
				local depotItems = getPlayerDepotItems(cid, getDepotId(depot.uid))
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s" or "") .. ".")
				break
			end
		end

		return TRUE
	end

	return FALSE
end

function onStepOut(cid, item, position, fromPosition)
	if(not decreasingItems[item.itemid]) then
		return FALSE
	end

	if(isPlayer(cid) ~= TRUE or isPlayerGhost(cid) ~= TRUE) then
		doTransformItem(item.uid, decreasingItems[item.itemid])
		return TRUE
	end

	return FALSE
end
 
Wogole nie tylko to nie dziala na najnowszym rev.
Code:
data/talkactions/scripts/remove.lua:9: attempt to call global 'getPlayerLookPos' (a nil value)
stack traceback:
        data/talkactions/scripts/remove.lua:9: in function <data/talkactions/scripts/remove.lua:1>
data/talkactions/scripts/remove.lua:9: attempt to call global 'getPlayerLookPos' (a nil value)
stack traceback:
        data/talkactions/scripts/remove.lua:9: in function <data/talkactions/scripts/remove.lua:1>
 
Pewnie nie umiejetnie i zle zrobiles update swojego serwera. Nie polega to tylko na tym ze podmieniasz pliki exe. Zmiany sa takze w plikach LUA.

moj remove
Lua:
function onSay(cid, words, param, channel)
	local amount = 1
	param = tonumber(param)
	if(param) then
		amount = tonumber(param)
	end

	local tmp = {}
	local toPos = getPlayerLookPos(cid)
	toPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
	tmp = getThingFromPos(toPos)
	if(tmp.uid ~= 0) then
		if(isCreature(tmp.uid) == TRUE) then
			doRemoveCreature(tmp.uid)
		else
			doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
		end

		doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
		return TRUE
	end

	toPos.stackpos = STACKPOS_TOP_FIELD
	tmp = getThingFromPos(toPos)
	if(tmp.uid ~= 0) then
		doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
		doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
		return TRUE
	end

	toPos.stackpos = STACKPOS_TOP_CREATURE
	tmp = getThingFromPos(toPos)
	if(tmp.uid ~= 0) then
		doRemoveCreature(tmp.uid)
		doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
		return TRUE
	end

	for i = 5, 1, -1 do
		toPos.stackpos = i
		tmp = getThingFromPos(toPos)
		if(tmp.uid ~= 0) then
			if(isCreature(tmp.uid) == TRUE) then
				doRemoveCreature(tmp.uid)
			else
				doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
			end

			doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
			return TRUE
		end
	end

	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	return TRUE
end
 
Mam ten sam plik. Nie tylko exe podmienilem ale wszystkie pliki ;) Zawsze podmieniam wszystko w czym byly jakiekolwiek zmiany
 
No to nie wiem. Ja tez podmienilem wszystko starannie, ale nie ma ani jednego bledu.
 
dżizys marian ;/ nie podmieniłeś wszystko bo, o:

compat.lua

getPlayerLookPos = getCreatureLookPosition

ogólnie ta funkcja nosi teraz nazwe 'getCreatureLookPosition'
 
Back
Top