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

[B]Help and script[/B]

Nacke

New Member
Joined
Feb 13, 2008
Messages
79
Reaction score
0
console give error

[Error -action Inteface]
data/actions/teleports.lua:inUse
Description:
data/actions/teleports.lua:51:attempt to call global 'doSetItemAction' <a nil value>
stack traceback:
data/actions/teleports.lua:51: in function <data/actions/scripts/teleports.lua:1


im using tfs 0.3.6

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)





-- tablica z pozycjami lawy 


local Lawa = {


{x=314,y=812,z=15}, 

{x=314,y=811,z=15}, 

{x=314,y=810,z=15},  

{x=314,y=809,z=15}, 

{x=314,y=808,z=15}, 

{x=314,y=807,z=15}, 

{x=313,y=808,z=15}, 

{x=313,y=809,z=15}, 

{x=313,y=810,z=15}, 

{x=313,y=811,z=15}, 

{x=313,y=812,z=15}, 

{x=313,y=813,z=15}, 


} 






if (itemEx.uid == 12344) then -- unique kamienia

if (getGlobalStorageValue(5544) == -1) then 

local Teleport = doCreateTeleport(1387, {x=314,y=809,z=15}, {x=322,y=841,z=15}) -- tworzenie teleportu 

doSetItemActionId(Teleport, 12345)


for i = 1, #Lawa do -- petla tworzenia lawy

 doCreateItem(5815, 1, Lawa[i]) -- funkcja tworzenia lawy 
 doSendMagicEffect(Lawa[i], CONST_ME_POFF)


end
end

else 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It\'s not time yet.") 
end 
end


thz for you time
 
Code:
-- tablica z pozycjami lawy
local Lawa = {
	{x=314,y=812,z=15},
	{x=314,y=811,z=15},
	{x=314,y=810,z=15}, 
	{x=314,y=809,z=15},
	{x=314,y=808,z=15},
	{x=314,y=807,z=15},
	{x=313,y=808,z=15},
	{x=313,y=809,z=15},
	{x=313,y=810,z=15},
	{x=313,y=811,z=15},
	{x=313,y=812,z=15},
	{x=313,y=813,z=15}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getGlobalStorageValue(5544) < 1 then
		local Teleport = doCreateTeleport(1387, {x=314,y=809,z=15}, {x=322,y=841,z=15}) -- tworzenie teleportu
		doItemSetAttribute(Teleport, "aid", 12345)
		for i = 1, #Lawa do -- petla tworzenia lawy
			doCreateItem(5815, 1, Lawa[i]) -- funkcja tworzenia lawy 
			doSendMagicEffect(Lawa[i], CONST_ME_POFF)
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It's not time yet.")
	end
	return true
end
 
Back
Top