• 01-04.05.2026 - DOUBLE EXP / SKILL EVENT!

Quest crashuje serwer

KrychaXX

User
Zarejestrowany
Dołączył
Maj 31, 2008
Posty
18
Liczba reakcji
0
Witam. Posiadam silnik TheForgottenServer 0.3.6 i skrypt z 0.3.5 i powoduje mi on wy??czenie si? serwera i mam takie pytanie kt?ra linijka mog?a spowodowa? wy?aczenie si? serwera?, przypominam, ?e serwer crashuje si? ca?kowicie, wyskakuje okienko, ?e program zosta? wy?aczony a na linuxie, ?e wyst?pi?o naruszenie pami?ci TFS

PHP:
local playerPos =
{
	[1] = {x=1037, y=1147, z=8, stackpos = 253},
	[2] = {x=1037, y=1149, z=8, stackpos = 253}
}

local newPos =
{
	[1] = {x=1033, y=1146, z=11}, -- New Player Positions
	[2] = {x=1033, y=1148, z=11}
}

local player1 = getThingfromPos(playerPos[1])
local player2 = getThingfromPos(playerPos[2])

function onUse(cid, item, fromPosition, itemEx, toPosition)
   	if item.uid == 7001 and item.itemid == 1945 then
		if isPlayer(player1) == true and isPlayer(player2) == true then
				doTeleportThing(player1.uid, newPos[1])
				doTeleportThing(player2.uid, newPos[2])
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have entered the quest!")
			doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
			addEvent(changeLever, 5 * 60000)
		else
			doPlayerSendCancel(cid, "You have to be 2 people to enter this quest.")
		end
	elseif (item.itemid == 1946) then
		doPlayerSendCancel(cid, "The quest is already active, you must wait.")
	end
	return TRUE
end

local function changeLever()
    if getThingfromPos(cid, cfg.leverPos) == 1946 then
        doTransformItem(item.uid, 1945)
    end
end
 
Back
Do góry