• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Avesta 7.72 logged in problem

Daniel13

New Member
Joined
Nov 30, 2008
Messages
178
Reaction score
1
Hello i can't logged in ;/
Console error :

Code:
data/creaturescripts/scripts/login.lua:17: in function

Code:
 data/creaturescripts/scripts/login.lua:17: attempt to call global 'getPlayerPosition' (a nil value)
stack traceback:
    data/creaturescripts/scripts/login.lua:17: in function <data/creaturescripts/scripts/login.lua:16>

My login.lua

Code:
h = 5
v = 4

function onLogin(cid)
    t = 0
    for i=1,100 do
        t = t + 50
        addEvent(sendEffect, t, cid)
    end 
   
    doPlayerSendTextMessage(cid, 17, "Welcome in Avesta.")
   
    return TRUE
end

function sendEffect(c)
    p = getPlayerPosition(c)
    p.x = p.x + math.random(-h, h)
    p.y = p.y + math.random(-v, v)
    doSendMagicEffect(p, math.random(0, 24))
end
 
Last edited:
Do you have the source? The avesta source I have has this function.
You can also try getThingPos or getCreaturePosition.
 
Last edited:
Back
Top