D
Deleted member 141899
Guest
Hello, im using Tfs 1.1, i have an error on my script "gapWagons" in beregar quest:
When i restart the server the script dont work and get an error saying: attempt to index a upvalue 'tile' line:
if i /reload actions, the scripts works lol, why?
please help!
When i restart the server the script dont work and get an error saying: attempt to index a upvalue 'tile' line:
Code:
if player:getStorageValue(Storage.hiddenCityOfBeregar.RoyalRescue) == 1 and tile:getItemById(7122) then
if i /reload actions, the scripts works lol, why?
Code:
local tile = Tile(Position(32571, 31508, 9))
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(Storage.hiddenCityOfBeregar.RoyalRescue) == 1 and tile:getItemById(7122) then
player:setStorageValue(Storage.hiddenCityOfBeregar.RoyalRescue, 2)
player:teleportTo(Position(32578, 31507, 9))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say("You safely passed the gap but your bridge collapsed behind you.", TALKTYPE_MONSTER_SAY)
if tile then
local thing = tile:getItemById(7122)
if thing then
thing:remove()
end
local secondThing = tile:getItemById(5779)
if secondThing then
secondThing:remove()
end
end
else
player:teleportTo(Position(32580, 31487, 9))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say("You need to build a bridge to pass the gap.", TALKTYPE_MONSTER_SAY)
end
return true
end
please help!
Last edited by a moderator: