first item dando erro...
por causa dele os account manager num ta entrando...
olha o q apareçe no executer do ot:
[11/11/2009 13:26:01] Lua Script Error: [CreatureScript Interface] [11/11/2009 13:26:01] data/creaturescripts/scripts/firstitems.lua:onLogin [11/11/2009 13:26:01] data/creaturescripts/scripts/firstitems.lua:52: bad argument #1 to 'maxn' (table expected, got nil) [11/11/2009 13:26:01] stack traceback: [11/11/2009 13:26:01] [C]: in function 'maxn' [11/11/2009 13:26:01] data/creaturescripts/scripts/firstitems.lua:52: in function <data/creaturescripts/scripts/firstitems.lua:50> [11/11/2009 13:26:01] Account Manager has logged out.
Meu first idem ta assim ajuda plz...
local firstItems = {} firstItems[0] = { 2173, -- aol 2525, -- shield 8820, -- mage hat 2647, -- plate legs 2643, -- leather boots 8819, -- magic robe 2190 -- wand of vortex } firstItems[1] = { 2173, -- aol 2525, -- shield 8820, -- mage hat 2647, -- plate legs 2643, -- leather boots 8819, -- magic robe 2190 -- wand of vortex } firstItems[2] = { 2173, -- aol 2525, -- shield 8820, -- mage hat 2647, -- plate legs 2643, -- leahter boots 8819, -- magic robe 2182 -- snakebit } firstItems[3] = { 2173, -- aol 2525, -- shield 8923, -- ranger legs 2643, -- leather boots 2463, -- plate armor 2456 } firstItems[4] = { 2173, -- aol 2525, -- shield 2647, -- plate legs 2643, -- leather boots 2463, -- plate armor } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1) end local bag = doPlayerAddItem(cid, 10521, 1) doAddContainerItem(bag, 2124, 1) doAddContainerItem(bag, 2383, 1) doAddContainerItem(bag, 2429, 1) doAddContainerItem(bag, 2394, 1) doAddContainerItem(bag, 2389, 2) doAddContainerItem(bag, 2160, 4) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 2789, 40) setPlayerStorageValue(cid, 30001, 1) end return TRUE end