Hugofasima
Website: thenosegang.servegame.com
- Joined
- Jun 24, 2015
- Messages
- 206
- Reaction score
- 23
Hello every one, I need to fix this script for TFS 1.1
My TFS is 1.0
Error:
Please guys, I really don't know how to do it.
My TFS is 1.0
places =
{
[1] = {placeName = "Depot", placeStorage = 6661, placepos = {x = 79, y = 63, z = 6}},
[2] = {placeName = "Gaz'Haragoth Lair", placeStorage = 6662, placepos = {x = 2073, y = 228, z = 9}},
[3] = {placeName = "Azshara North Catacomb", placeStorage = 6663, placepos = {x = 259, y = 401, z = 7}}
}
function getCatacombByName(name)
for k, v in pairs(places) do
if v.placeName:lower() == name:lower() then
return k
end
end
return false
end
function sendCatacombWindow(cid)
CatacombWindow = ModalWindow(1900, "Catacombs Teleporter", "Select place:")
if CatacombWindow:getId() == 1900 then
CatacombWindow:addButton(1, "Teleport")
CatacombWindow:setDefaultEnterButton(1)
CatacombWindow:addButton(2, "Cancel")
CatacombWindow:setDefaultEscapeButton(2)
for i = 1, #places do
if getCreatureStorage(cid, places.placeStorage) == 1 then
CatacombWindow:addChoice(i, places.placeName)
end
end
end
CatacombWindow:sendToPlayer(cid)
return true
end
{
[1] = {placeName = "Depot", placeStorage = 6661, placepos = {x = 79, y = 63, z = 6}},
[2] = {placeName = "Gaz'Haragoth Lair", placeStorage = 6662, placepos = {x = 2073, y = 228, z = 9}},
[3] = {placeName = "Azshara North Catacomb", placeStorage = 6663, placepos = {x = 259, y = 401, z = 7}}
}
function getCatacombByName(name)
for k, v in pairs(places) do
if v.placeName:lower() == name:lower() then
return k
end
end
return false
end
function sendCatacombWindow(cid)
CatacombWindow = ModalWindow(1900, "Catacombs Teleporter", "Select place:")
if CatacombWindow:getId() == 1900 then
CatacombWindow:addButton(1, "Teleport")
CatacombWindow:setDefaultEnterButton(1)
CatacombWindow:addButton(2, "Cancel")
CatacombWindow:setDefaultEscapeButton(2)
for i = 1, #places do
if getCreatureStorage(cid, places.placeStorage) == 1 then
CatacombWindow:addChoice(i, places.placeName)
end
end
end
CatacombWindow:sendToPlayer(cid)
return true
end
Error:
Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/catacombs/teleporter.lua: onStepIn
data/catacombs.lua:28: attempt to call global 'getCreatureStorage' (a nil value)
stack traceback:
[C]: in function 'getCreatureStorage'
data/catacombs.lua:28: in function <data/catacombs.lua:17>
Last edited: