Inconsistent error message with getfenv()
Kan18 opened this issue ยท 2 comments
Useful information to include:
- Minecraft 1.12.2
- CC: Tweaked 1.84.0
- using CodersNet modpack
- Detailed reproduction steps:
Open a new computer and open /rom/programs/lua. Doinggetfenv(false)
orgetfenv(true)
(or with a table) will show the error message of: 'bad argument: integer expected, got (type)'.getfenv("test")
(or any other string) will show the error message of:bad argument: number expected, got string
.
Normal behavior of Lua looks like this:
While this is a CC:T/Cobalt bug, please stop using getfenv
. If we ever move to Lua 5.2+, it's going to break.