teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)
doSetItemActionId(getTileItemById(pos, tpID).uid, 1337)
Attempt to index a nil value
stack traceback:
[c]: in funtion 'getTileItemById'
data/creaturesctips/scripts/inquisitionPortals.lua:29: in funtion
<data/creaturesctips/scripts/inquisitionPortals.lua:1>
local tpID = 1 --This is the item id of the teleport.
teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)
doSetItemActionId(getTileItemById(pos, tpID).uid, 1337)
doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "actionid", 3351)
doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "aid", 3351)
doCreateTeleport(1387, redTpPos, templePos)
doItemSetAttribute(getTileItemById(templePos, 1387).uid, "actionid", 3351)
doCreateTeleport(1387, redTpPos, templePos)
doItemSetAttribute(getTileItemById(templePos, 1387).uid, "aid", 3354)
What does doCreateTeleport return? Try printing the value.I am trying to create a teleport with an action ID. I use TFS 0.3.6 and there is the function. The teleport is created, but the teleport has not an action id, when I look on it right click.
Neither this code and this below doesn't work.
Code:doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "actionid", 3351)
Code:doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "aid", 3351)
Neither this doesn't work:
Code:local tp = doCreateTeleport(1387, redTpPos, templePos) doItemSetAttribute(getTileItemById(templePos, 1387).uid, "actionid", 3351)
print(doCreateTeleport(1387, redTpPos, templePos))