We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to redirect stdout to a <pre>, so I did
<pre>
const handleExecute = async () => { setOutput('') try { const lua = await getLuaState() const _G = lua.getGlobalTable() // const io = _G.get('io') as LuaTable _G.set('print', (args: any) => { console.log({ args }) setOutput((prev) => prev + args + '\n') console.log("print(): " + args) }) await lua.run(code); } catch (error: any) { setOutput("Error: " + error.message) } }
however args seems to be undefined for any input
args
undefined
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to redirect stdout to a
<pre>
, so I didhowever
args
seems to beundefined
for any inputThe text was updated successfully, but these errors were encountered: