• 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 mod pvshop

rogersenchou

New Member
Joined
Nov 27, 2016
Messages
36
Reaction score
3
hi otlanders i have this problem

i have this error :
Code:
[24/5/2017 21:9:47] mysql_real_query(): SELECT `shopitens` FROM `players` WHERE `id` = '38'; - MYSQL ERROR: Unknown column 'shopitens' in 'field list' (1054)
Code:
[24/5/2017 21:9:47] [Error - TalkAction Interface] 
[24/5/2017 21:9:47] mods/scripts/Private Shop/Talkaction.lua:onSay
[24/5/2017 21:9:47] Description: 
[24/5/2017 21:9:47] data/lib/004-database.lua:82: [Result:getDataString] Result not set!
[24/5/2017 21:9:47] stack traceback:
[24/5/2017 21:9:47]     [C]: in function 'error'
[24/5/2017 21:9:47]     data/lib/004-database.lua:82: in function 'getDataString'
[24/5/2017 21:9:47]     data/lib/Private Shop LIB.lua:151: in function 'getPlayerShopItens'
[24/5/2017 21:9:47]     mods/scripts/Private Shop/Talkaction.lua:90: in function <mods/scripts/Private Shop/Talkaction.lua:22>

this is the script
Code:
-- ########################################################
-- #####        Name: Private Shop System             #####
-- #####        Version: 2.0                          #####
-- ########################################################
-- #####  Developed by Maxwell Alcantara[MaXwEllDeN]  #####
-- #####  Contact: [email protected]               #####
-- #####           [email protected]             #####
-- ########################################################

local function tabletama(tb)
        local tam = 0

        for i, v in pairs(tb) do
                tam = tam + 1
        end

        return tam
end

local funcs = {"on", "off", "add", "remove", "list", "help", "list"}

function onSay(cid, words, param)        

        local param = param:lower()
        local params = string.explode(param, ",")
        local param = params[1]

        local configs = _PV_SHOP_CONFIG

        if (configs.premmy) and not(isPremium(cid)) then
                return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must have a premium account to use this system.")
        end

        if (getPlayerLevel(cid) < configs.level) then
                return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must be at least level " .. configs.level .. " to use this system.")
        end

        if not(isInArray(funcs, param)) then
                return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You typed a invalid option, to see help window type ".. words .. " help.")
        end

        if (param == "on") then
                if (getCreatureCondition(cid, CONDITION_INFIGHT)) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't activate the system with your pz locked.")
                end

                local pos = getThingPos(cid)
                local pos1 = {x = pos.x-5, y = pos.y-5, z = pos.z}
                local pos2 = {x = pos.x+5, y = pos.y+5, z = pos.z}
                local uids = ge
            local uids = getUidsInArea(pos1, pos2)

                for _, b in pairs(uids) do
                        if (not(isPlayer(b)) and not (isMonster(b))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You're near a npc.")
                        end
                end

                local pikznelis = 0
                for _, a in pairs(getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid)))) do
                        pikznelis = 1
                        break
                end

                if (pikznelis == 0) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must add a item to your shop before ative it.")
                end

                setPlayerStorageValue(cid, 75431, 1)
                addEvent(doRemoveCreature, 1, cid)
        elseif (param == "add") then

                if not(params[4]) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You typed a invalid option, to see help window type ".. words .. " help.")
                end
       
                local item        
                if type(errors) == "function" then
                        errors(false)
                        item = getItemIdByName(params[2])
                        errors(true)
                else
                        item = getItemIdByName(params[2], false)
                end
               
                if not (item) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[2] .." isn't a valid item.")
                end

                if (tabletama(getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid)))) >= configs.maxitens) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't have more than ".. configs.maxitens.." types of items in your Private Shop.")
                end

                if (isInArray(configs.notadd, item)) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't add " .. params[2] .. " to Private Shop.")
                end

                if not(tonumber(params[3])) or (tonumber(params[3]) < 1) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[3] .. " isn't a valid quanty.")
                end

                if (getPlayerItemCount(cid, item) < tonumber(params[3])) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You haven't ".. params[3] .." " .. params[2] .."(s).")
                end

                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You added with successful ".. params[3] .. " ".. params[2] .."(s) to your Private Shop.")
                doAddItemForPlayerShop(getPlayerGUIDByName(getCreatureName(cid)), item, params[3], params[4])
                doPlayerRemoveItem(cid, item, tonumber(params[3]))
        elseif (param == "list") then
                local itens = getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid)))
                local msgiteins = "Items in your Private Shop:\n"

                for a, b in pairs(itens) do
                        msgiteins = msgiteins .. "\n".. b[1] .. " " .. getItemNameById(a) .. getPrefix(b[1]) .. " - ".. b[2] .. " Gold Coins"
                end

                local msgiteins = msgiteins .. "\nX-X-X-X-X-X-X-X-X-X-X-X-X"
               
                        doPlayerPopupFYI(cid, msgiteins)
                       
                       
        elseif (param == "remove") then
                if not(params[3]) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You typed a invalid option, to see help window type ".. words .. " help.")
                end

                if not(tonumber(params[3])) or (tonumber(params[3]) < 1) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[3] .. " isn't a valid quanty.")
                end

                local item = getItemIdByName(params[2])
                if not (item) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[2] .." isn't a item.")
                end

                local shopt = getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid)))
                if not(shopt[item]) or (tonumber(shopt[item][1]) < tonumber(params[3])) then
                        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You haven't ".. params[3] .." " .. params[2] .."(s) in Private Shop.")
                end

                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You removed with successful ".. params[3] .. " ".. params[2] .."(s) from your Private Shop.")
                doRemoveItemFromPlayerShop(getPlayerGUIDByName(getCreatureName(cid)), item, params[3])
                doPlayerAddItem(cid, item, tonumber(params[3]))
        elseif (param == "help") then
                local msg = "Private Shop System Help: \n \n * add - is used to add a item to your Private Shop. \n"
                local msg = msg .."     Usage Example: " .. words .. " add, item, quanty, price by unit"
                local msg = msg .."\n" .. words .. " add, demon armor, 1, 60000\n"
                local msg = msg .."\n * remove - is used to remove a item from your Private Shop. \n"
                local msg = msg .."     Usage Example: " .. words .. " remove, item, quanty"
                local msg = msg .."\n" .. words .. " remove, demon armor, 5\n"
                local msg = msg .."\n * on - is used to active your Private Shop\n"
                local msg = msg .. "\n * list - displays in screen a window containing all items that you have in your Private Shop."
        doPlayerPopupFYI(cid, msg)
   end

   return true
end

help me please im using tfs 0.3.7 otxserver :)
 
Back
Top