What's new

Skrypty & Kody Nie dzia?aj? mi Drabinki 8.6

Status
Not open for further replies.

Kodzak360

User
Joined
Apr 23, 2013
Messages
27
Reaction score
0
Witam.
Nie dzia?aja mi drabinki taki mam b??d w silniku:
[Error - Action Interface]
data/actions/scripts/other/teleport.lua:eek:nUse
Description:
data/actions/scripts/other/teleport.lua:15: attempt to call global 'getThingFromPos' (a nil value)
stack traceback:
data/actions/scripts/other/teleport.lua:15: in function <data/actions/scripts/other/teleport.lua:5>
nwm jak to naprawi? prosz? o pomoc.
 

Kodzak360

User
Joined
Apr 23, 2013
Messages
27
Reaction score
0
Odp: Nie dzia?aj? mi Drabinki 8.6

Ju? podaj?
local UP_FLOORS = {1386, 3678, 5543, 8599, 10035}
local FIELDS = {1497, 1499, 11095, 11096}
local DRAW_WELL = 1369

function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == DRAW_WELL and item.actionid ~= 100) then
return false
end

if(isInArray(UP_FLOORS, item.itemid)) then
fromPosition.z = fromPosition.z - 1
fromPosition.y = fromPosition.y + 1

fromPosition.stackpos = STACKPOS_GROUND
if(item.actionid == 100 or getThingFromPos(fromPosition, false).itemid == 0) then
fromPosition.y = fromPosition.y - 2
end
else
fromPosition.z = fromPosition.z + 1
end

local pos, dir = getCreaturePosition(cid), SOUTH
if(pos.x < fromPosition.x) then
dir = EAST
elseif(pos.x == fromPosition.x) then
if(pos.y == fromPosition.y) then
dir = getCreatureLookDirection(cid)
elseif(pos.y > fromPosition.y) then
dir = NORTH
end
elseif(pos.x > fromPosition.x) then
dir = WEST
end

doTeleportThing(cid, fromPosition, false)
doCreatureSetLookDirection(cid, dir)
return true
end
 

misztrz440

Banned
Joined
Dec 15, 2012
Messages
1,032
Reaction score
39
Odp: Nie dzia?aj? mi Drabinki 8.6

Jak nic nie grzebales to ?le ustawiles albo nie dales specjalnej kratki nad drabina
 
Status
Not open for further replies.
Top