i have an error in script maybe someone can help me solve it?
thats the script:
Lua:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/citizen.lua:onStepIn
data/movements/scripts/citizen.lua:18: attempt to compare number with nil
stack traceback:
data/movements/scripts/citizen.lua:18: in function <data/movements/scrip
ts/citizen.lua:17>
thats the script:
Lua:
local towns = {
"Venore",
"Edron",
"Carlin",
"Ab dendriel",
"Kazordoon",
"Thais",
"Darashia",
"Port Hope",
"Svargrond",
"Ankrahmun",
"Liberty Bay",
"Donate Island",
"Azeroth"
}
function onStepIn(cid, item, position, fromPosition)
if item.uniqueid > 8000 and item.uniqueid < 8100 then
local newTown = item.uniqueid - 8000
doPlayerSetTown(cid, newTown)
doSendAnimatedText(getCreaturePosition(cid, 'You became citizen of a ' .. towns[newTown], TEXTCOLOR_GOLD))
end
return TRUE
end
Last edited: