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

Error in actionscript (looks really simple to fix)

Evan

A splendid one to behold
Senator
Premium User
Joined
May 6, 2009
Messages
7,018
Solutions
1
Reaction score
1,040
Location
United States
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
monster_pos = {x=668, y=1049, z=6}
temple_pos = {x=841, y=1013, z=7}
success = math.random(1, 7)
	if item.itemid == 1945 and success == 1 then 
		if doPlayerRemoveMoney(cid, 50000) then
			doTransformItem(item.uid, 1946)  
			addEvent(summonMonster0, 3 * 1000)
			doTeleportThing(cid, monster_pos, TRUE)
		else
			doCreatureSay(cid, "You don't have enough money !", TALKTYPE_ORANGE_1)
		end
	elseif item.itemid == 1946 then
		doTransformItem(item.uid, 1945) 
	else
		doCreatureSay(cid, "Robin Hood did not welcome you this time!", TALKTYPE_ORANGE_1)
		doPlayerRemoveMoney(cid, 50000)
	end
	return true
end  
 
function summonMonster0()   
	doSummonCreature('Robin Hood', monster_pos)
	doSendMagicEffect(monster_pos, 10)
	doCreatureSay(cid, "MISSION: Kill Robin Hood.  You have five minutes.", TALKTYPE_ORANGE_1)
	addEvent(countDown, 20 * 1000)
end

function countDown()
	doTeleportThing(cid, temple_pos, TRUE)
end

ERROR:
[Error - Action Interface]
In a timer event called from:
data/actions/scripts/raid/robinhood.lu
Description:
(luaDoTeleportThing) Thing not found

Anyone know what the problem is?


REP++ for those who can help me out!
 
LUA:
doTeleportThing(cid, fromPosition, monster_pos, TRUE)
LUA:
doTeleportThing(cid, fromPosition, temple_pos, TRUE)
 
here:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
monster_pos = {x=668, y=1049, z=6}
temple_pos = {x=841, y=1013, z=7}
success = math.random(1, 7)
	if item.itemid == 1945 and success == 1 then 
		if doPlayerRemoveMoney(cid, 50000) then
			doTransformItem(item.uid, 1946)  
			addEvent(summonMonster0, 3 * 1000, cid)
			doTeleportThing(cid, monster_pos, TRUE)
		else
			doCreatureSay(cid, "You don't have enough money !", TALKTYPE_ORANGE_1)
		end
	elseif item.itemid == 1946 then
		doTransformItem(item.uid, 1945) 
	else
		doCreatureSay(cid, "Robin Hood did not welcome you this time!", TALKTYPE_ORANGE_1)
		doPlayerRemoveMoney(cid, 50000)
	end
	return true
end  
 
function summonMonster0(cid)   
	doSummonCreature('Robin Hood', monster_pos)
	doSendMagicEffect(monster_pos, 10)
	doCreatureSay(cid, "MISSION: Kill Robin Hood.  You have five minutes.", TALKTYPE_ORANGE_1)
	addEvent(countDown, 20 * 1000, cid)
end
 
function countDown(cid)
	doTeleportThing(cid, temple_pos, TRUE)
end



kind regards, Evil Hero.
 
here:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
monster_pos = {x=668, y=1049, z=6}
temple_pos = {x=841, y=1013, z=7}
success = math.random(1, 7)
	if item.itemid == 1945 and success == 1 then 
		if doPlayerRemoveMoney(cid, 50000) then
			doTransformItem(item.uid, 1946)  
			addEvent(summonMonster0, 3 * 1000, cid)
			doTeleportThing(cid, monster_pos, TRUE)
		else
			doCreatureSay(cid, "You don't have enough money !", TALKTYPE_ORANGE_1)
		end
	elseif item.itemid == 1946 then
		doTransformItem(item.uid, 1945) 
	else
		doCreatureSay(cid, "Robin Hood did not welcome you this time!", TALKTYPE_ORANGE_1)
		doPlayerRemoveMoney(cid, 50000)
	end
	return true
end  
 
function summonMonster0(cid)   
	doSummonCreature('Robin Hood', monster_pos)
	doSendMagicEffect(monster_pos, 10)
	doCreatureSay(cid, "MISSION: Kill Robin Hood.  You have five minutes.", TALKTYPE_ORANGE_1)
	addEvent(countDown, 20 * 1000, cid)
end
 
function countDown(cid)
	doTeleportThing(cid, temple_pos, TRUE)
end



kind regards, Evil Hero.

Here's what happens after the 20 second countdown:

[Error - Action Interface]
In a timer event called from:
data/actions/scripts/raid/robinhood.lua:onUse
Description:
(luaDoTeleportThing) Thing not found

Same error for Fresh too
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
monster_pos = {x=668, y=1049, z=6}
temple_pos = {x=841, y=1013, z=7}
success = math.random(1, 7)
	if item.itemid == 1945 and success == 1 then 
		if doPlayerRemoveMoney(cid, 50000) then
			doTransformItem(item.uid, 1946)  
			addEvent(summonMonster0, 3 * 1000, cid)
			doTeleportThing(cid, monster_pos, TRUE)
		else
			doCreatureSay(cid, "You don't have enough money !", TALKTYPE_ORANGE_1)
		end
	elseif item.itemid == 1946 then
		doTransformItem(item.uid, 1945) 
	else
		doCreatureSay(cid, "Robin Hood did not welcome you this time!", TALKTYPE_ORANGE_1)
		doPlayerRemoveMoney(cid, 50000)
	end
	return true
end  
 
function summonMonster0(cid)   
	doSummonCreature('Robin Hood', monster_pos)
	doSendMagicEffect(monster_pos, 10)
	doCreatureSay(cid, "MISSION: Kill Robin Hood.  You have five minutes.", TALKTYPE_ORANGE_1)
	addEvent(countDown, 20 * 1000, cid)
end
 
function countDown(cid)
	if isPlayer(cid) then
		doTeleportThing(cid, temple_pos, TRUE)
	end
end



kind regards, Evil Hero.
 
Sorry for the delay:

[21:43:46.359] [Error - Action Interface]
[21:43:46.360] In a timer event called from:
[21:43:46.362] data/actions/scripts/raid/robinhood.lua:onUse
[21:43:46.363] Description:
[21:43:46.364] (luaDoTeleportThing) Thing not found

Same error.

Using 0.4 TFS now.
 
Back
Top