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

Please fast! Need help :s

Martiimeus

●тнυg●ℓιƒє● ρα¢ 4 єνєя
Joined
Feb 3, 2009
Messages
500
Reaction score
1
Location
gєямαηу
I got an weird error (well i was updating my server to 8.42) I wanted to make this command here:
12:55 [CM] Noxu: /goto Der Pilz

well Idk why it dont works :(

heres the error:

[30/05/2009 12:56:38] data/talkactions/scripts/teleporttiles.lua:21: attempt to call global 'isPlayerGhost' (a nil value)
[30/05/2009 12:56:38] stack traceback:
[30/05/2009 12:56:38] data/talkactions/scripts/teleporttiles.lua:21: in function <data/talkactions/scripts/teleporttiles.lua:1>

please need help :(

teleporttiles.lua:

function onSay(cid, words, param)
local n = 1
if(param ~= "" and tonumber(param)) then
n = tonumber(param)
end

local pos = getPosByDir(getCreaturePosition(cid), getPlayerLookDir(cid), n)
pos.stackpos = STACKPOS_GROUND
if(getTileThingByPos(pos).uid == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot teleport there.")
return TRUE
end

pos = getClosestFreeTile(cid, pos, FALSE, FALSE)
if(pos == LUA_ERROR or isInArray({pos.x, pos.y, pos.z}, 0) == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
return TRUE
end

local tmp = getCreaturePosition(cid)
if(doTeleportThing(cid, pos, TRUE) ~= LUA_ERROR and isPlayerGhost(cid) ~= TRUE) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end

return TRUE
end


please whats wrong there? Need help! fast! :(
 
i guess you can just remove the following:
Code:
and isPlayerGhost(cid) ~= TRUE
but it will also mess up "invisible" system when teleporting... so it would not be a *good fix*..

or you can remove the following:
Code:
if(doTeleportThing(cid, pos, TRUE) ~= LUA_ERROR and isPlayerGhost(cid) ~= TRUE) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end
and it would mess up the "white poff" and "teleport mark" when teleporting not-invisible
 
i guess you can just remove the following:
Code:
and isPlayerGhost(cid) ~= TRUE
but it will also mess up "invisible" system when teleporting... so it would not be a *good fix*..

or you can remove the following:
Code:
if(doTeleportThing(cid, pos, TRUE) ~= LUA_ERROR and isPlayerGhost(cid) ~= TRUE) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end
and it would mess up the "white poff" and "teleport mark" when teleporting not-invisible

FAIL! Nothing works now lol aff.. nvm! I will download a new ots -.-
 
Back
Top Bottom