I think you do not understand me, but ultimately could fix my script?
Loading actions... [Error - LuaInterface::loadFile] data/actions/scripts/freeset1.lua:3: 'end' expected (to close 'function' at line 1) near 'elseif'
[7/1/2016 18:27:20] [Error - Event::checkScript] Cannot load script (data/actions/scripts/freeset1.lua)
[7/1/2016 18:27:20] data/actions/scripts/freeset1.lua:3: 'end' expected (to close 'function' at line 1) near 'elseif'
[7/1/2016 18:27:26] (done).
function onUse(cid, item, frompos, item2, topos)
elseif item.uid == 1881 then
ids = {2501, 2503, 2504}
charges = {1, 1, 1, 1}
if getPlayerStorageValue(cid,1881) == -1 then
setPlayerStorageValue(cid,1881,1)
bp = doPlayerAddItem(cid, 2365, 1)
for i = 1, #ids do
doAddContainerItem(bp, ids, charges)
end
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
elseif item.uid == 1882 then
ids = {7902, 7897, 7896}
charges = {1, 1, 1, 1}
if getPlayerStorageValue(cid,1882) == -1 then
setPlayerStorageValue(cid,1882,1)
bp = doPlayerAddItem(cid, 2365, 1)
for i = 1, #ids do
doAddContainerItem(bp, ids, charges)
end
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
end
return TRUE
end