Skylinx
Game Programmer
[10/12/2008 19:30:31] Warning: [Event::loadScript] Can not load script. data/creaturescripts/scripts/firstitems.lua
[10/12/2008 19:30:31] data/creaturescripts/scripts/firstitems.lua:16: 'end' expected (to close 'if' at line 12) near 'else'
Why's it friggin saying that? I've tried putting what it says, and idk wtf is wrong!
Can someone please my firstitems.lua script to a correct format?
PHP:
local firstItems =
{
2050,
2382
}
function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems) do
doPlayerAddItem(cid, firstItems[i], 1)
end
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2651, 1)
else
doPlayerAddItem(cid, 2650, 1)
else
doPlayerAddItem(cid, 2648, 1)
else
doPlayerAddItem(cid, 2458, 1)
else
doPlayerAddItem(cid, 2643, 1)
else
doPlayerAddItem(cid, 2398, 1)
end
end
local bag = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(bag, 2666, 3)
doAddContainerItem(bag, 2190, 1)
doAddContainerItem(bag, 2389, 50)
doAddContainerItem(bag, 2182, 1)
doAddContainerItem(bag, 2160, 1)
doAddContainerItem(bag, 2367, 1)
doAddContainerItem(bag, 2428, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
I made the script my self, but I dont understand what's wrong? o_o