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

Several problems with movements

Raiden

Developer
Joined
Sep 16, 2008
Messages
486
Reaction score
32
Location
Venezuela
Hello! i got a 7.4 avesta server and i think that the server are bugged.. why? because no one movement script works i get the same error (only with functions onStepIn and onStepOut)

Error in my console:

Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/annitp.lua:onStepIn (in others onStepOut depend of the function script)

attempt to call a table value
stack traceback:

No one script with stepIn or StepOut works th same error appears and i think that is server problems... i can't change the server because is the only one 7.4. i know how to compile and i got the sources. how i can repair this error? compiling? or modifing any thing in the data folder? rep+++ for some help
 
You are most likely trying to read a table value (Array) as a variable, thus it gives that error.

Like for example you're trying to call the UID of an user on a tile, and instead of doing "tile.uid" you do "tile", it'll give you that error.
 
You are most likely trying to read a table value (Array) as a variable, thus it gives that error.

Like for example you're trying to call the UID of an user on a tile, and instead of doing "tile.uid" you do "tile", it'll give you that error.

AAAA i understand the problem now... but how i can repair it?

For example there is teh annitp.lua script:

Code:
function onStepIn(cid, item, pos)

local pos = {x=202, y=146, z=13}

if getPlayerStorageValue(100, 1) then
   doTeleportThing(cid, pos)
else
   doPlayerSendCancel(cid, "Take a reward first")
   doSendMagicEffect(getPlayerPosition(cid), 2)
end
return true
end

i test it on other servers and works really fine but in my avesta 7.4 don't works because i'm trying to read a table value like a variable... so where i can change it?
 
Unless I'm missing something horribly obvious here, that script looks okay.

Could you post the stack traceback and the entire error?
It would supply more detailed information such as the line which errors and such.
 
Unless I'm missing something horribly obvious here, that script looks okay.

Could you post the stack traceback and the entire error?
It would supply more detailed information such as the line which errors and such.

this is the completed error
Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/annitp.lua:onStepIn 
attempt to call a table value
stack traceback:

and what are tracebacks?
 
tracebacks are the text below "stack traceback:", they tell you what happened where how and when.
You sure there aint any other text besides what you copypasted onto here?
 
If I'm correct... You've an error in the "getPlayerStorageValue".. You forgot to put the one that gets the player... I mean the "cid" one.. If that's the case.

Try this:
getPlayerStorageValue(cid, 100)

So, it would be something like this:
Code:
function onStepIn(cid, item, pos)
local pos = {x=202, y=146, z=13}

if getPlayerStorageValue(cid, 100) then
   doTeleportThing(cid, pos)
else
   doPlayerSendCancel(cid, "Take a reward first")
   doSendMagicEffect(getPlayerPosition(cid), 2)
end
return true
end

Try that, and tell us if it works or not.. I didn't try it xD!

x)
 
If I'm correct... You've an error in the "getPlayerStorageValue".. You forgot to put the one that gets the player... I mean the "cid" one.. If that's the case.

Try this:
getPlayerStorageValue(cid, 100)

So, it would be something like this:
Code:
function onStepIn(cid, item, pos)
local pos = {x=202, y=146, z=13}

if getPlayerStorageValue(cid, 100) then
   doTeleportThing(cid, pos)
else
   doPlayerSendCancel(cid, "Take a reward first")
   doSendMagicEffect(getPlayerPosition(cid), 2)
end
return true
end

Try that, and tell us if it works or not.. I didn't try it xD!

x)

same error i think that script are correct!
 
Waaaa I forgott thee value u're searching for in thee getPlayerStorageValue()

Try this onee:
Code:
function onStepIn(cid, item, pos)
local pos = {x=202, y=146, z=13}

if getPlayerStorageValue(cid, 100) == 1 then
   doTeleportThing(cid, pos)
else
   doPlayerSendCancel(cid, "Take a reward first")
   doSendMagicEffect(getPlayerPosition(cid), 2)
end
return true
end

I think that will work ;)
 
Back
Top