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

Magic Rope error...

Itachi89

New Member
Joined
Jul 30, 2007
Messages
20
Reaction score
0
I get this error when I use magic rope (exani tera)

Lua Script Error: [Spell Interface]
data/spells/scripts/magic rope.lua:eek:nCastSpell

attempt to index a number value
 
I get this error when I use magic rope (exani tera)

Lua Script Error: [Spell Interface]
data/spells/scripts/magic rope.lua:eek:nCastSpell

attempt to index a number value
 
I ll test it here and see if its work
edit: here working
try change ur magic rope.lua
for it:
Code:
local ArrayRopeSpot = {384, 418}

function onCastSpell(cid, var)
	local pos = getPlayerPosition(cid)
	pos.stackpos = 0
	local grounditem = getThingfromPos(pos)

	if(isInArray(ArrayRopeSpot, grounditem.itemid) == TRUE) then
		local newpos = pos
		newpos.y = newpos.y + 1
		newpos.z = newpos.z - 1
		doTeleportThing(cid, newpos, 0)
		doSendMagicEffect(pos, CONST_ME_ENERGYAREA)
		return LUA_NO_ERROR
	else
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		doSendMagicEffect(pos, CONST_ME_POFF)
		return LUA_ERROR
	end	
end
 
I ll test it here and see if its work
edit: here working
try change ur magic rope.lua
for it:
Code:
local ArrayRopeSpot = {384, 418}

function onCastSpell(cid, var)
	local pos = getPlayerPosition(cid)
	pos.stackpos = 0
	local grounditem = getThingfromPos(pos)

	if(isInArray(ArrayRopeSpot, grounditem.itemid) == TRUE) then
		local newpos = pos
		newpos.y = newpos.y + 1
		newpos.z = newpos.z - 1
		doTeleportThing(cid, newpos, 0)
		doSendMagicEffect(pos, CONST_ME_ENERGYAREA)
		return LUA_NO_ERROR
	else
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		doSendMagicEffect(pos, CONST_ME_POFF)
		return LUA_ERROR
	end	
end
 
Back
Top