• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error KillingInTheNameOf 8.6

Rider Ones

New Member
Joined
Jan 12, 2009
Messages
104
Reaction score
2
Hello dear players i get this error when kill trolls i have started a task

Lua:
[20/3/2017 14:14:59] [Error - CreatureScript Interface]
[20/3/2017 14:14:59] data/creaturescripts/scripts/killinginthenameof.lua:onKill
[20/3/2017 14:14:59] Description:
[20/3/2017 14:14:59] data/creaturescripts/scripts/killinginthenameof.lua:3: attempt to call global 'getPlayerStartedTasks' (a nil value)
[20/3/2017 14:14:59] stack traceback:
[20/3/2017 14:14:59]     data/creaturescripts/scripts/killinginthenameof.lua:3: in function <data/creaturescripts/scripts/killinginthenameof.lua:1>

This is my scripts:
Lua:
function onKill(cid, target, lastHit)
    local started = getPlayerStartedTasks(cid)
    if isPlayer(target) or isSummon(target) then return true end
    if started and #started > 0 then
        for _, id in ipairs(started) do
            if isInArray(tasks[id].creatures, getCreatureName(target):lower()) then
                if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < 0 then
                    doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0)
                end
                if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < tasks[id].killsRequired then
                    doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) + 1)
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) .. "/" .. tasks[id].killsRequired .. " " .. tasks[id].raceName .. " already killed.")
                end
            end
        end
    end
    return true
end

And dont get Questlog


HELP??
 
Make sure you have all the appropriate files in the library directory and that they are referenced via dofile in globals.lua
 
Back
Top