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

Little fix (probably easy)

Snow

New Member
Joined
Jan 16, 2008
Messages
381
Reaction score
0
Code:
[29/06/2010 18:56:48] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/behemothQuestLever.lua:20: '<eof>' expected near 'end'
[29/06/2010 18:56:48] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/behemothQuestLever.lua)
[29/06/2010 18:56:48] data/actions/scripts/quests/behemothQuestLever.lua:20: '<eof>' expected near 'end'

my bug

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    removals = { --Stones
        { x = 33295 , y = 31677 , z = 15, stackpos = 1 },
        { x = 33296 , y = 31677 , z = 15, stackpos = 1 },
        { x = 33297 , y = 31677 , z = 15, stackpos = 1 },
        { x = 33298 , y = 31677 , z = 15, stackpos = 1 },
        { x = 33299 , y = 31677 , z = 15, stackpos = 1 },
    }
    
     if item.itemid == 1945 then
        for i = 1, #removals do
            doRemoveItem(getThingfromPos(removals[i]).uid, 1)
        end
		local LeverPos = {x=33290, y=31715, z=12}
		doSendMagicEffect(LeverPos, CONST_ME_POFF)
		doTransformItem(item.uid, item.itemid + 1)
	end
  return TRUE
end
end


Anybody fix please?
rep++
 
replace with

local conf = {

wallPos = { x = 33295 , y = 31677 , z = 15, stackpos = 1 },
wallPos1 = { x = 33296 , y = 31677 , z = 15, stackpos = 1 },
wallPos2 = { x = 33297 , y = 31677 , z = 15, stackpos = 1 },
wallPos3 = { x = 33298 , y = 31677 , z = 15, stackpos = 1 },
wallPos4 = { x = 33299 , y = 31677 , z = 15, stackpos = 1 },
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getGlobalStorageValue(55505) then
doRemoveItem(getThingFromPos(conf.wallPos).uid,1)
doRemoveItem(getThingFromPos(conf.wallPos1).uid,1)
doRemoveItem(getThingFromPos(conf.wallPos2).uid,1)
doRemoveItem(getThingFromPos(conf.wallPos3).uid,1)
doRemoveItem(getThingFromPos(conf.wallPos4).uid,1)
end
return TRUE
end
Not Tested

Srry i'm not scripter =]

Updated:
Removed End bug
 
Last edited:
Back
Top