Cristian2387
New Member
- Joined
- Oct 2, 2014
- Messages
- 34
- Reaction score
- 0
hello i edited a script this is what it looked like before i edited:
This is what it looked like after i edited
all i did is change the items for account manager so it looks nicer this is the error i get
please help
Code:
local firstItems = {}
firstItems[0] =
{
2173,
2525,
3965,
2124,
2457,
2647,
2643
}
firstItems[1] =
{
2173,
2525,
7424,
2124,
2457,
2647,
2643
}
firstItems[2] =
{
2173,
2525,
7424,
2124,
2457,
2647,
2643
}
firstItems[3] =
{
2173,
2525,
8853,
2352,
2124,
2457,
2647,
2643
}
firstItems[4] =
{
2173,
2525,
8932,
2124,
2457,
2647,
2643
}
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
if getPlayerSex(cid) == 0 then
doPlayerAddItem(cid, 2463, 1)
else
doPlayerAddItem(cid, 2463, 1)
end
local bag = doPlayerAddItem(cid, 11235, 1)
doAddContainerItem(bag, 2160, 100)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
Code:
local firstItems = {}
firstItems[0] =
{
10718,
2524,
7735,
2127,
2497,
2504,
2641,
2503,
12289
}
firstItems[1] =
{
2173,
2525,
7424,
2124,
2457,
2647,
2643,
2463
}
firstItems[2] =
{
2173,
2525,
7424,
2124,
2457,
2647,
2643,
2463
}
firstItems[3] =
{
2173,
2525,
8853,
2352,
2124,
2457,
2647,
2643,
2463
}
firstItems[4] =
{
2173,
2525,
8932,
2124,
2457,
2647,
2643,
2463
}
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)
local bag = doPlayerAddItem(cid, 11235, 1)
doAddContainerItem(bag, 2160, 100)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end
Code:
[17/10/2014 19:55:06] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/firstitems.lua:72: 'end' expected (to close 'function' at line 60) near '<eof>'
[17/10/2014 19:55:06] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/firstitems.lua)
[17/10/2014 19:55:06] data/creaturescripts/scripts/firstitems.lua:72: 'end' expected (to close 'function' at line 60) near '<eof>'