Error KillingInTheNameOf 8.6

Discussion in 'Support' started by Rider Ones, Mar 20, 2017.

  1. Rider Ones

    Rider Ones Member

    Joined:
    Jan 12, 2009
    Messages:
    99
    Likes Received:
    2
    Best Answers:
    0
    Hello dear players i get this error when kill trolls i have started a task

    Code (Lua):
    1. [20/3/2017 14:14:59] [Error - CreatureScript Interface]
    2. [20/3/2017 14:14:59] data/creaturescripts/scripts/killinginthenameof.lua:onKill
    3. [20/3/2017 14:14:59] Description:
    4. [20/3/2017 14:14:59] data/creaturescripts/scripts/killinginthenameof.lua:3: attempt to call global 'getPlayerStartedTasks' (a nil value)
    5. [20/3/2017 14:14:59] stack traceback:
    6. [20/3/2017 14:14:59]     data/creaturescripts/scripts/killinginthenameof.lua:3: in function <data/creaturescripts/scripts/killinginthenameof.lua:1>
    This is my scripts:
    Code (Lua):
    1. function onKill(cid, target, lastHit)
    2.     local started = getPlayerStartedTasks(cid)
    3.     if isPlayer(target) or isSummon(target) then return true end
    4.     if started and #started > 0 then
    5.         for _, id in ipairs(started) do
    6.             if isInArray(tasks[id].creatures, getCreatureName(target):lower()) then
    7.                 if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < 0 then
    8.                     doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0)
    9.                 end
    10.                 if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < tasks[id].killsRequired then
    11.                     doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) + 1)
    12.                     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) .. "/" .. tasks[id].killsRequired .. " " .. tasks[id].raceName .. " already killed.")
    13.                 end
    14.             end
    15.         end
    16.     end
    17.     return true
    18. end
    And dont get Questlog


    HELP??
     
  2. Makalo

    Makalo Banned User

    Joined:
    Mar 20, 2017
    Messages:
    20
    Likes Received:
    6
    Best Answers:
    0
  3. Rider Ones

    Rider Ones Member

    Joined:
    Jan 12, 2009
    Messages:
    99
    Likes Received:
    2
    Best Answers:
    0
  4. Makalo

    Makalo Banned User

    Joined:
    Mar 20, 2017
    Messages:
    20
    Likes Received:
    6
    Best Answers:
    0
    Make sure you have all the appropriate files in the library directory and that they are referenced via dofile in globals.lua
     
  5. Rider Ones

    Rider Ones Member

    Joined:
    Jan 12, 2009
    Messages:
    99
    Likes Received:
    2
    Best Answers:
    0
    I dont have global.lua help??
     

Share This Page

Loading...