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

PRoblems firstitems and login in

wafuboe

Member
Joined
Dec 24, 2010
Messages
881
Solutions
2
Reaction score
22
Im having trouble i cant loginwith any character available, here are the errors in console

I need help:(

Code:
[11/5/2014 1:44:46] mysql_real_query(): SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_inboxitems` WHERE `player_id` = 1 ORDER BY `sid` DESC; - MYSQL ERROR: Table 'shoyowar.player_inboxitems' doesn't exist (1146)
[11/5/2014 1:44:47] Account Manager has logged in.

[11/5/2014 1:44:47] [Error - MoveEvents Interface]
[11/5/2014 1:44:47] data/movements/scripts/tiles.lua:onStepIn
[11/5/2014 1:44:47] Description:
[11/5/2014 1:44:47] data/movements/scripts/tiles.lua:53: attempt to call global 'isInArray' (a nil value)
[11/5/2014 1:44:47] stack traceback:
[11/5/2014 1:44:47]    data/movements/scripts/tiles.lua:53: in function <data/movements/scripts/tiles.lua:16>

[11/5/2014 1:44:47] [Error - CreatureScript Interface]
[11/5/2014 1:44:47] data/creaturescripts/scripts/firstitems.lua:onLogin
[11/5/2014 1:44:47] Description:
[11/5/2014 1:44:47] data/creaturescripts/scripts/firstitems.lua:85: attempt to call global 'isInArray' (a nil value)
[11/5/2014 1:44:47] stack traceback:
[11/5/2014 1:44:47]    data/creaturescripts/scripts/firstitems.lua:85: in function <data/creaturescripts/scripts/firstitems.lua:78>

[11/5/2014 1:44:47] [Error - CreatureScript Interface]
[11/5/2014 1:44:47] data/creaturescripts/scripts/advancesave.lua:onAdvance
[11/5/2014 1:44:47] Description:
[11/5/2014 1:44:47] attempt to index a nil value
[11/5/2014 1:44:47] stack traceback:
[11/5/2014 1:44:47]    [C]: in function 'doSendMagicEffect'
[11/5/2014 1:44:47]    data/creaturescripts/scripts/advancesave.lua:15: in function <data/creaturescripts/scripts/advancesave.lua:7>
[11/5/2014 1:44:47]    [C]: in function 'doPlayerAddExperience'
[11/5/2014 1:44:47]    data/creaturescripts/scripts/lowlevellock.lua:4: in function <data/creaturescripts/scripts/lowlevellock.lua:1>
[11/5/2014 1:44:47] Account Manager has logged out.
[11/5/2014 1:45:29] mysql_real_query(): SELECT `pid`, `sid`, `itemtype`, `count`, `attributes` FROM `player_inboxitems` WHERE `player_id` = 2 ORDER BY `sid` DESC; - MYSQL ERROR: Table 'shoyowar.player_inboxitems' doesn't exist (1146)
[11/5/2014 1:45:29] Boogie has logged in.

[11/5/2014 1:45:29] [Error - MoveEvents Interface]
[11/5/2014 1:45:29] data/movements/scripts/tiles.lua:onStepIn
[11/5/2014 1:45:29] Description:
[11/5/2014 1:45:29] data/movements/scripts/tiles.lua:53: attempt to call global 'isInArray' (a nil value)
[11/5/2014 1:45:29] stack traceback:
[11/5/2014 1:45:29]    data/movements/scripts/tiles.lua:53: in function <data/movements/scripts/tiles.lua:16>

[11/5/2014 1:45:29] [Error - CreatureScript Interface]
[11/5/2014 1:45:29] data/creaturescripts/scripts/firstitems.lua:onLogin
[11/5/2014 1:45:29] Description:
[11/5/2014 1:45:29] data/creaturescripts/scripts/firstitems.lua:85: attempt to call global 'isInArray' (a nil value)
[11/5/2014 1:45:29] stack traceback:
[11/5/2014 1:45:29]    data/creaturescripts/scripts/firstitems.lua:85: in function <data/creaturescripts/scripts/firstitems.lua:78>
[11/5/2014 1:45:30] Boogie has logged out.
[11/5/2014 1:45:30] mysql_real_query(): DELETE FROM `player_inboxitems` WHERE `player_id` = 2; - MYSQL ERROR: Table 'shoyowar.player_inboxitems' doesn't exist (1146)
[11/5/2014 1:45:30] mysql_real_query(): DELETE FROM `player_inboxitems` WHERE `player_id` = 2; - MYSQL ERROR: Table 'shoyowar.player_inboxitems' doesn't exist (1146)
[11/5/2014 1:45:31] mysql_real_query(): DELETE FROM `player_inboxitems` WHERE `player_id` = 2; - MYSQL ERROR: Table 'shoyowar.player_inboxitems' doesn't exist (1146)
[11/5/2014 1:45:31] Error while saving player: Boogie.
 
Found this on otland:
Code:
CREATE TABLE IF NOT EXISTS `player_inboxitems` 
(
`player_id` INTEGER NOT NULL, 
`sid` INTEGER NOT NULL, 
`pid` INTEGER NOT NULL DEFAULT 0, 
`itemtype` SMALLINT NOT NULL, 
`count` SMALLINT NOT NULL DEFAULT 0, 
`attributes` BLOB NOT NULL, 
UNIQUE (`player_id`,`sid`), 
PRIMARY KEY (`player_id`), 
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
);
This one should fix your database problem.

About those lua errors - you're trying to use functions with non-value parameters. Paste scripts here so someone could help you with them.
 
Ok, the only thing left is this..
Its pretty weird though

Code:
[11/5/2014 10:36:58] [Error - MoveEvents Interface]
[11/5/2014 10:36:58] data/movements/scripts/tiles.lua:onStepIn
[11/5/2014 10:36:58] Description:
[11/5/2014 10:36:58] data/movements/scripts/tiles.lua:53: attempt to call global 'isInArray' (a nil value)
[11/5/2014 10:36:58] stack traceback:
[11/5/2014 10:36:58]    data/movements/scripts/tiles.lua:53: in function <data/movements/scripts/tiles.lua:16>

[11/5/2014 10:36:58] [Error - CreatureScript Interface]
[11/5/2014 10:36:58] data/creaturescripts/scripts/firstitems.lua:onLogin
[11/5/2014 10:36:58] Description:
[11/5/2014 10:36:58] data/creaturescripts/scripts/firstitems.lua:85: attempt to call global 'isInArray' (a nil value)
[11/5/2014 10:36:58] stack traceback:
[11/5/2014 10:36:58]    data/creaturescripts/scripts/firstitems.lua:85: in function <data/creaturescripts/scripts/firstitems.lua:78>

[11/5/2014 10:36:58] [Error - CreatureScript Interface]
[11/5/2014 10:36:58] data/creaturescripts/scripts/advancesave.lua:onAdvance
[11/5/2014 10:36:58] Description:
[11/5/2014 10:36:58] attempt to index a nil value
[11/5/2014 10:36:58] stack traceback:
[11/5/2014 10:36:58]    [C]: in function 'doSendMagicEffect'
[11/5/2014 10:36:58]    data/creaturescripts/scripts/advancesave.lua:15: in function <data/creaturescripts/scripts/advancesave.lua:7>
[11/5/2014 10:36:58]    [C]: in function 'doPlayerAddExperience'
[11/5/2014 10:36:58]    data/creaturescripts/scripts/lowlevellock.lua:4: in function <data/creaturescripts/scripts/lowlevellock.lua:1>
[11/5/2014 10:36:58] Account Manager has logged out.

Here the involved scripts
FIRST ITEMS
Code:
local commonItems = {
  -- ITEMS ALL VOCS RECEIVE
  {itemid=2789, count=100}, -- brown mushrooms
  {itemid=2261, count=1}, -- destroy field rune
  {itemid=2273, count=1}, -- uh
  {itemid=2293, count=1}, -- mw
  {itemid=2305, count=1}, -- fire bomb rune
  {itemid=2420, count=1}, -- machete
  {itemid=5801, count=1}, -- extra backpack
}

local firstItems = {
  { --SORCERER ITEMS
    {itemid=2493, count=1}, -- hat of the mad
    {itemid=2494, count=1}, -- focus cape
    {itemid=8918, count=1}, -- spellbook of dark mysteries
    {itemid=2195, count=1}, -- boots of haste
    {itemid=6132, count=1}, -- soft boots
    {itemid=2495, count=1}, -- demon legs
    {itemid=8922, count=1}, -- voodoo wand

    {itemid=2268, count=1}, -- sd
    {itemid=7590, count=1}, -- gmp
   
  },
  { --  DRUID ITEMS
    {itemid=2493, count=1}, -- hat of the mad
    {itemid=2494, count=1}, -- focus cape
    {itemid=8918, count=1}, -- spellbook of dark mysteries
    {itemid=2195, count=1}, -- boots of haste
    {itemid=6132, count=1}, -- soft boots
    {itemid=2495, count=1}, -- demon legs
    {itemid=8922, count=1}, -- voodoo wand

    {itemid=2268, count=1}, -- sd
    {itemid=7590, count=1}, -- gmp
    {itemid=2278, count=1}, -- paralyze
    {itemid=2269, count=1}, -- wild growth
  },
  { -- PALADIN ITEMS
    {itemid=2493, count=1}, -- demon helmet
    {itemid=2494, count=1}, -- demon armor
    {itemid=2495, count=1}, -- demon legs
    {itemid=6132, count=1}, -- soft boots
    {itemid=2195, count=1}, -- boots of haste
    {itemid=2514, count=1}, -- mastermind shield
    {itemid=7368, count=1}, -- assassin stars

    {itemid=2268, count=1}, -- sd
    {itemid=8472, count=1}, -- gsp
    {itemid=7589, count=1}, -- smp
    {itemid=7588, count=1}, -- shp
   
  },
  { --  KNIGHT ITEMS
    {itemid=2493, count=1}, -- demon helmet
    {itemid=2494, count=1}, -- demon armor
    {itemid=2514, count=1}, -- mastermind shield
    {itemid=6132, count=1}, -- soft boots
    {itemid=2195, count=1}, -- boots of haste
    {itemid=2495, count=1}, -- demon legs
    {itemid=2400, count=1}, -- magic sword
    {itemid=2431, count=1}, -- sca
    {itemid=2421, count=1}, -- thunder hammer

    {itemid=7620, count=1}, -- mp
    {itemid=7591, count=1}, -- ghp
    {itemid=8473, count=1}, -- uhp
  }
}

for _, items in ipairs(firstItems) do
  for _, item in ipairs(commonItems) do
    table.insert(items, item)
  end
end

function onLogin(cid)
  if getPlayerGroupId(cid) < 2 then
    local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708)

    if hasReceivedFirstItems ~= 1 then
      --[[local backpack = ]]doPlayerAddItem(cid, 2365, 1)
      local playerVocation = getPlayerVocation(cid)
      if(isInArray({5, 6, 7, 8}, playerVocation)) then
            playerVocation = playerVocation - 4
      end
      local giveItems = firstItems[playerVocation]

      if giveItems ~= nil then
        for _, v in ipairs(giveItems) do
          --doAddContainerItem(backpack, v.itemid, v.count or 1)
          doPlayerAddItem(cid, v.itemid, v.count or 1)
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ya has obtenido tus items y  skills estas listo para war^^!")
      end
      setPlayerStorageValue(cid, 67708, 1)
    end
  end
  return TRUE
end

LOWLEVELOCK
Code:
function onLogin(cid)

    if getPlayerLevel(cid) < 100 then
    doPlayerAddExperience(cid, (getExperienceForLevel(100) - getPlayerExperience(cid)))
end
return TRUE
end

ADVANCESAVE
Code:
local config = {
    savePlayer = true,
    healPlayerOnLevel = true,
    effectType = 30
}

function onAdvance(cid, skill, oldLevel, newLevel)
    if(skill == SKILL__EXPERIENCE) then
        return true
    end

    if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
        doSendMagicEffect(pos, config.effectType)
    end

    if(config.savePlayer) then
        doPlayerSave(cid, true)
    end

    return true
end
 
Back
Top