Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash :-( #8

Open
VanessaE opened this issue Apr 6, 2020 · 4 comments
Open

Crash :-( #8

VanessaE opened this issue Apr 6, 2020 · 4 comments

Comments

@VanessaE
Copy link

VanessaE commented Apr 6, 2020

Running Minetest 5.2.0-release

2020-04-06 01:15:19: WARNING[Main]: Undeclared global variable "file_exists" accessed at ...st/worlds/MTZ_World/worldmods/travelpoints/functions.lua:635
2020-04-06 01:15:19: ACTION[Main]: Server: Shutting down
2020-04-06 01:15:19: ERROR[Main]: ModError: Failed to load and run script from /home/minetest/.minetest/worlds/MTZ_World/worldmods/travelpoints/init.lua:
2020-04-06 01:15:19: ERROR[Main]: ...st/worlds/MTZ_World/worldmods/travelpoints/functions.lua:635: attempt to call global 'file_exists' (a nil value)
2020-04-06 01:15:19: ERROR[Main]: stack traceback:
2020-04-06 01:15:19: ERROR[Main]: 	...st/worlds/MTZ_World/worldmods/travelpoints/functions.lua:635: in function 'get_world_restrictions'
2020-04-06 01:15:19: ERROR[Main]: 	...inetest/worlds/MTZ_World/worldmods/travelpoints/init.lua:105: in main chunk

Mod security is enabled.

@heavygale
Copy link

The global function file_exists got removed in minetest/minetest#9451, because apparently "it's not used anywhere". Maybe we should add it to functions.lua - I did it manually on my server and it's working fine.

function file_exists(filename)
        local f = io.open(filename, "r")
        if f == nil then
                return false
        else
                f:close()
                return true
        end
end

https://github.com/minetest/minetest/pull/9451/files#diff-a09c7fe45339eba9cdf21f4b9c25b146L205-L213

@sbrl
Copy link
Contributor

sbrl commented Apr 17, 2020

I'm getting this crash too:

2020-04-17 01:59:10: ACTION[Main]: Server: Shutting down
2020-04-17 01:59:10: ERROR[Main]: ModError: Failed to load and run script from /srv/minetest-server/worldmods/travelpoints/init.lua:
2020-04-17 01:59:10: ERROR[Main]: /srv/minetest-server/worldmods/travelpoints/init.lua:75: attempt to call field 'execute' (a nil value)
2020-04-17 01:59:10: ERROR[Main]: stack traceback:
2020-04-17 01:59:10: ERROR[Main]: 	/srv/minetest-server/worldmods/travelpoints/init.lua:75: in main chunk

@zacaintmyname
Copy link

Getting the same error! :(

@sbrl
Copy link
Contributor

sbrl commented Oct 3, 2020

@zacaintmyname Try updating? My PR that got merged should fix this error.

Come to think of it, this issue can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants