svaarala / duktape

Duktape - embeddable Javascript engine with a focus on portability and compact footprint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using duk_require_string + duk_require_function only works one

Lyuu17 opened this issue · comments

So for some reason, I can't get both of them working in the same function, is anything wrong with my code?

c++ code
image

js code
image

error
image

How is addCommand registered as a global, could you show that call site? In particular what is the "num args" for it?

How is addCommand registered as a global, could you show that call site? In particular what is the "num args" for it?

hell, sorry. I was passing 1 argcount when registering it. I though duktape would throw an error or something if more args were passed to the function or something

Good that it was resolved 👍