You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to create a little bit of a test for my external files.
I created a file something.lua and it contains the text from the docs:
local HandyPackage = {
handyfunc = function(x, y)
return x + y
end,
handynumber = 3.14,
}
function _update()
test1 = HandyPackage.handyfunc(2, 3)
end
function _draw()
cls()
print('test1 = '..test1)
end
return HandyPackage
I then have a another.lua file that simply does the require:
Something = require('something')
When I attempt to run the build:
p8tool build side.p8 --lua another.lua
I get the following error:
...
File "......./picotool/pico8/lua/lua.py", line 502, in _get_text
assert (self._tokens[self._pos].matches(lexer.TokKeyword(keyword)) or
AssertionError
I did notice that if I include the "game_loop" option in the another.lua file, it doesn't throw this error:
I'd like to write these loops to possibly write some tests. Or maybe there's another way to test some of your utility files and also use them for real without having to alter the code?
The text was updated successfully, but these errors were encountered:
I'm attempting to create a little bit of a test for my external files.
I created a file
something.lua
and it contains the text from the docs:I then have a
another.lua
file that simply does therequire
:When I attempt to run the build:
I get the following error:
I did notice that if I include the "game_loop" option in the
another.lua
file, it doesn't throw this error:I'd like to write these loops to possibly write some tests. Or maybe there's another way to test some of your utility files and also use them for real without having to alter the code?
The text was updated successfully, but these errors were encountered: