• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Ayuda] error en talkaction del Mod Characters Market System

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    3zequi3l

    3zequi3l
    Miembro
    Miembro
    Descripcion escribió:hola buenas tardes, este Mod es para tfs 0.4 version 8.6...
    Me da error en el talkaction al hacer !character list, que es para que me muestre la lista de characters a la venta..., los demas si estan buenos... (!character buy, sell, remove)
    Por favor, necesito resolverlo y quisiera una posible solucion...
    este es el error que me muestra en la consola... simplemente hago el comando y no hace nada solo se queda pegado 1-2 segundos el servidor y me da el error en consola...

    [23:38:50.676] [Error - TalkAction Interface]
    [23:38:50.677] local cid = 268465771
    [23:38:50.679] local words = "!character"
    [23:38:50.684] local param = "list"
    [23:38:50.686] local channel = 65534
    [23:38:50.687] domodlib('market')
    [23:38:50.700] local t = string.explode(param, ",")
    [23:38:50.704]
    [23:38:50.711] if t[1] == "sell" then
    [23:38:50.719] if not t[3] or not tonumber(t[3]) or t[4] or tonumber(t[2]) then
    [23:38:50.722] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name and the price.") return true
    [23:38:50.729] elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then
    [23:38:50.739] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true
    [23:38:50.741] elseif isCharacterForSale(t[2]) then
    [23:38:50.749] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is already for sale.") return true
    [23:38:50.766] elseif getPlayerGUIDByName(t[2]) == getPlayerGUID(cid) then
    [23:38:50.767] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You cannot sell yourself.") return true
    [23:38:50.771] elseif getPlayerByName(t[2]) then
    [23:38:50.772] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The character must be offline to be sold.") return true
    [23:38:50.774] elseif getOfflinePlayerValue(t[2], "level") < level then
    [23:38:50.777] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your character can't be sold until it has level "..level..".") return true
    [23:38:50.792] elseif tonumber(t[3]) < min_price then
    [23:38:50.795] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the minimum price for selling a character is "..min_price..".") return true
    [23:38:50.800] elseif tonumber(t[3]) > max_price then
    [23:38:50.802] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the maximum price for selling a character is "..max_price..".") return true
    [23:38:50.804] end
    [23:38:50.805]
    [23:38:50.806] setOfflinePlayerStorageValue(t[2], price, t[3])
    [23:38:50.808] setOfflinePlayerStorageValue(t[2], owner, getPlayerGUID(cid))
    [23:38:50.809] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" is now for sale for the price of "'..t[3]..'" gold coins.')
    [23:38:50.811] elseif t[1] == "buy" then
    [23:38:50.812] if not t[2] then
    [23:38:50.816] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true
    [23:38:50.820] elseif not playerExists(t[2]) then
    [23:38:50.823] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character doesn't exist.") return true
    [23:38:50.825] elseif getPlayerAccountId(cid) == getAccountIdByName(t[2]) then
    [23:38:50.828] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't buy your own character.") return true
    [23:38:50.834] elseif not isCharacterForSale(t[2]) then
    [23:38:50.838] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true
    [23:38:50.842] elseif not doPlayerRemoveMoney(cid, getOfflinePlayerStorageValue(t[2], price)) then
    [23:38:50.844] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Not enough money. This character's price is "..getOfflinePlayerStorageValue(t[2], price).." gold coins.") return true
    [23:38:50.847] end
    [23:38:50.850]
    [23:38:50.853] if not getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)) then
    [23:38:50.857] doOfflinePlayerAddMoney(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price))
    [23:38:50.859] setOfflinePlayerStorageValue(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), 41792, getPlayerGUIDByName(t[2]))
    [23:38:50.867] else
    [23:38:50.869] doPlayerAddMoney(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price))
    [23:38:50.872] doPlayerSendTextMessage(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" has been sold for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.')
    [23:38:50.875] end
    [23:38:50.879] doTransferCharacter(t[2], getPlayerAccountId(cid))
    [23:38:50.886] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You bought the character "'..t[2]..'" for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.')
    [23:38:50.888] setOfflinePlayerStorageValue(t[2], owner, -1)
    [23:38:50.891] setOfflinePlayerStorageValue(t[2], price, -1) return true
    [23:38:50.895] elseif t[1] == "remove" then
    [23:38:50.897] if not t[2] then
    [23:38:50.902] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true
    [23:38:50.905] elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then
    [23:38:50.907] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true
    [23:38:50.910] elseif not isCharacterForSale(t[2]) then
    [23:38:50.916] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true
    [23:38:50.918] end
    [23:38:50.918]
    [23:38:50.919] setOfflinePlayerStorageValue(t[2], price, -1)
    [23:38:50.920] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You removed the character "'..t[2]..'" from the Characters Market.') return true
    [23:38:50.921] elseif t[1] == "list" then
    [23:38:50.921] local result = db.getResult("SELECT `name` FROM `players`")
    [23:38:50.922] if result:getID() == -1 then
    [23:38:50.923] return true
    [23:38:50.924] end
    [23:38:50.925] local msg = "Characters for Sale:\n\n"
    [23:38:50.925] while true do
    [23:38:50.926] local name = result:getDataString("name")
    [23:38:50.927] if isCharacterForSale(name) then
    [23:38:50.928] local sex = getOfflinePlayerValue(name, "sex") == 1 and "Male" or "Female"
    [23:38:50.928] msg = ""..msg.." - ".. name .." (Level: "..getOfflinePlayerValue(name, "level").." / Vocation: "..getVocationInfo(getOfflinePlayerValue(name, "vocation")).name.." / Sex: "..sex.." / Owner: "..getPlayerNameByGUID(getOfflinePlayerStorageValue(name, owner))..") [Price: "..getOfflinePlayerStorageValue(name, price).."] \n"
    [23:38:50.932] end
    [23:38:50.935] if not result:next() then
    [23:38:50.937] break
    [23:38:50.938] end
    [23:38:50.940] end
    [23:38:50.941] doPlayerPopupFYI(cid, msg) return true
    [23:38:50.943] elseif not t[1] or t[1] ~= "buy" or t[1] ~= "sell" or t[1] ~= "remove" or t[1] ~= "list" then
    [23:38:50.944] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect params. You can only 'buy' or 'sell' a character, 'remove' it from the Characters Market or see the 'list' of characters for sale.") return true
    [23:38:50.948] end
    [23:38:50.949] return true

    [23:38:50.951] Description:
    [23:38:50.952] [string "price = 27112..."]:26: attempt to concatenate a nil value





    Gracias de antemano, aparte de esto si no es posible resolverlo en el servidor, hacer una parte de una pagina web que muestre los characters a la venta... o algo así amigos...
    Captura del Error escribió:Imagen del error: [Ayuda] error en talkaction del Mod Characters Market System Empty
    El error radica en: Otro Problema

    2 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    tendrias que fijarte aqui el precio

    Código:
     [string "price = 27112..."]:26: attempt to concatenate a nil value



    [Ayuda] error en talkaction del Mod Characters Market System YNU5B25
    2 participantes
    http://www.tibiaface.com

    3zequi3l

    3zequi3l
    Miembro
    Miembro
    podria ayudarme? por favor... no se que hacer Sad

    2 participantes

    Contenido patrocinado


    2 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).