• 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!

Solved did a mistake now i cant find whats wrong please help

jlskelin

New Member
Joined
Mar 28, 2009
Messages
198
Reaction score
1
im getting errors on my ot
Lua:
[Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/dailycounter.lua:9: '}' expected (to close '{' at line 2) near '{'
[25/02/2017 16:59:22] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/dailycounter.lua)
[25/02/2017 16:59:22] data/creaturescripts/scripts/dailycounter.lua:9: '}' expected (to close '{' at line 2) near '{'


Lua:
local config = {
{["name"] = "Dragon", ["storage"] = 5, ["count"] = 50, ["exp"] = 2000, ["points"] = 5,  ["chance"] = 100},
{["name"] = "Demon", ["storage"] = 6, ["count"] = 100, ["exp"] = 3000, ["points"] = 5,  ["chance"] = 100},
{["name"] = "Ferumbras", ["storage"] = 7, ["count"] = 125, ["exp"] = 3000, ["points"] =5,  ["chance"] = 100},
{["name"] = "Evul Frog", ["storage"] = 10, ["count"] = 150, ["exp"] = 75000, ["points"] = 10, ["chance"] = 100},
{["name"] = "Headcutter", ["storage"] = 11, ["count"] = 175, ["exp"] = 95000, ["points"] = 10, ["chance"] = 100},
{["name"] = "Deadeye Devinous", ["storage"] = 12, ["count"] = 190, ["exp"] = 95000, ["points"] = 10,  ["chance"] = 100}
{["name"] = "Betrayed Wraith", ["storage"] = 17, ["count"] = 200, ["exp"] = 350000, ["points"] = 15, ["chance"] = 100},
{["name"] = "Mind Freak",["storage"] = 18, ["count"] = 275, ["exp"] = 350000, ["points"] = 15, ["chance"] = 100},
{["name"] = "Egyptian Mummy", ["storage"] = 19, ["count"] = 300, ["exp"] = 650000, ["points"] = 15, ["chance"] = 100},
{["name"] = "Shorty ", ["storage"] = 22, ["count"] = 350, ["exp"] = 550000, ["points"] = 20, ["chance"] = 100},
{["name"] = "Strong Freak", ["storage"] = 23, ["count"] = 375, ["exp"] = 650000, ["points"] = 20, ["chance"] = 100},
{["name"] = "King Kong", ["storage"] = 24, ["count"] = 400, ["exp"] = 650000, ["points"] = 20,  ["chance"] = 100},
{["name"] = "Dark Sorcerer", ["storage"] = 26, ["count"] = 450, ["exp"] = 1100000, ["points"] = 25, ["chance"] = 100},
{["name"] = "Medusa", ["storage"] = 27, ["count"] = 475, ["exp"] = 1500000, ["points"] = 25, ["chance"] = 100},
{["name"] = "Flamingo", ["storage"] = 28, ["count"] = 525, ["exp"] = 1500000, ["points"] = 25,  ["chance"] = 100},
{["name"] = "Warwick", ["storage"] = 30, ["count"] = 700, ["exp"] = 2000000, ["points"] = 30,  ["chance"] = 100},
{["name"] = "Bat Digga", ["storage"] = 34, ["count"] = 5, ["exp"] = 6000000, ["points"] = 20,  ["chance"] = 100},
{["name"] = "Sacred Ratzor", ["storage"] = 35, ["count"] = 5, ["exp"] = 4000000, ["points"] = 20,  ["chance"] = 100},
{["name"] = "The Mighty Lord", ["storage"] = 38, ["count"] = 10, ["exp"] = 8000000, ["points"] = 25, ["chance"] = 100},
{["name"] = "Dark Kriminal", ["storage"] = 39, ["count"] = 10, ["exp"] = 7000000, ["points"] = 25,  ["chance"] = 100},
{["name"] = "Macruffin", ["storage"] = 61, ["count"] = 15, ["exp"] = 8000000, ["points"] = 30,  ["chance"] = 100},
{["name"] = "King Scorpion", ["storage"] = 62, ["count"] = 20, ["exp"] = 8500000, ["points"] = 30, ["chance"] = 100},
{["name"] = "Bones Breaker", ["storage"] = 41, ["count"] = 20, ["exp"] = 9000000, ["points"] = 35,  ["chance"] = 100},
{["name"] = "Ghost Rider", ["storage"] = 42, ["count"] = 20, ["exp"] = 11000000, ["points"] = 35,  ["chance"] = 100},
{["name"] = "Frozen Druid", ["storage"] = 46, ["count"] = 25, ["exp"] = 13000000, ["points"] = 40,  ["chance"] = 100},
{["name"] = "Metallica", ["storage"] = 47, ["count"] = 25, ["exp"] = 15000000, ["points"] = 40,  ["chance"] = 100}
--{["name"] = "Elite Samurai", ["storage"] = 26, ["count"] = 50, ["exp"] = 1100000, ["item"] = 2160, ["icount"] = 5, ["chance"] = 100}
}
function onKill(cid, target, lastHit)
if lastHit == true then
    if(isPlayer(target) ~= TRUE) then
        local master = getCreatureMaster(target)
        if(master and master ~= target) then return TRUE end
      
        for i = 1, #config do
            if getCreatureName(target):lower() == config[i].name:lower() then
                if getPlayerStorageValue(cid, 2423) == config[i].storage then
                    setPlayerStorageValue(cid, 2425, getPlayerStorageValue(cid, 2425) + 1)
                    if config[i].name == "Black Fowler" then
                        if getPlayerStorageValue(cid, 2425) < config[i].count then
                            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Daily Quest: You have killed Fowler [" .. getPlayerStorageValue(cid, 2425) .. " / " .. config[i].count.."]")
                        elseif getPlayerStorageValue(cid, 2425) == config[i].count then
                            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Daily Quest: You have killed last Fowler, go back to NPC and report.")
                        end
                    else
                        if getPlayerStorageValue(cid, 2425) < config[i].count then
                            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Daily Quest: You have killed " .. config[i].name .. " [" .. getPlayerStorageValue(cid, 2425) .. " / " .. config[i].count.."]")
                        elseif getPlayerStorageValue(cid, 2425) == config[i].count then
                            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Daily Quest: You have killed last " .. config[i].name .. ", go back to NPC and report.")
                        end
                    end
                end
            end

line 2 is
  1. local config = { in my script
 
Last edited by a moderator:
You missed a comma at the end of line 7. Add it and try again.

And dont double post.
 
Solution
Back
Top