kikito/lua_missions

lua 5.2 env compatability

acrisci opened this issue · 2 comments

I'm running Arch and the lua in my path is 5.2.2. When I follow the instructions in the readme file to start the missions,

$ lua missions.lua

I get the following message

lua: ./lib/agent.lua:127: attempt to call global 'setfenv' (a nil value)
stack traceback:
    ./lib/agent.lua:127: in function 'load_mission'
    ./lib/agent.lua:212: in function 'run_missions'
    missions.lua:29: in main chunk
    [C]: in ?

This works fine.

$ lua5.1 missions.lua

Thanks for reporting this. Yes, I'm aware that the missions are lua 5.1-compatible but not lua 5.2. I still have to think of a way to solve this.

Hi @acrisci , I just uploaded a set of changes which make lua_missions compatible with Lua 5.2, in case you want to test them. I am closing this issue now.