visitant.lua issues

Forum rules
NO LONGER BEING MAINTAINED!
Post Reply
kowaikuroijishou
Posts: 1
Joined: Sun Nov 15, 2015 10:09 pm

visitant.lua issues

Post by kowaikuroijishou » Sun Nov 15, 2015 10:42 pm

When a player has visitant status, this script causes an error message to be displayed in the map server's log:

Code: Select all

[Error] [0m luautils::onEffectTick: scripts/globals/effects/visitant.lua:19: attempt to index global 'player' (a nil value)
If player is corrected to target, the map server crashes.

Code: Select all

    if (target:getVar("Abyssea_Time") >= 3) then
        target:setVar("Abyssea_Time",duration); -- This line seems to crash the map server after correction...
This change worked a few weeks back before the recent update. Commenting the setVar line stops the server from crashing.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: visitant.lua issues

Post by TeoTwawki » Mon Nov 16, 2015 5:46 am

Because duration was never defined. That the code you see even made it in and 100% accidental and you shouldn't even be trying to gain this effect because it doesn't exist yet.

Edit:
https://github.com/DarkstarProject/darkstar/pull/2421
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply