edit after 0.2.5e
The cart works fine in local 0.2.5e PICO-8, but uploading to the BBS (i.e. inserting in this post) is still broken. I think the _ENV is being changed to _env still by some processing after upload(?).
earlier post
The following prints out 1 twice on 0.2.5c, but crashes on 0.2.5d with:
runtime error line 10 tab 0
return function_a(_ENV)
attempt to call global 'func_a'
(a nil value)
in func_b line 10 (tab 0)
at line 17 (tab 0)
Code:
function get_thing() return { func_a=function(_ENV) return 1 end, func_b=function(_ENV) return func_a(_ENV) end } end thing=get_thing() print(thing:func_a()) print(thing:func_b()) |
Makes some of the OO/class stuff (based on https://www.lexaloffle.com/bbs/?pid=116282) that I've been doing a little limited.
[Please log in to post a comment]