Jump to content




[LuaJ Question] attempt to call function


  • You cannot reply to this topic
2 replies to this topic

#1 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 19 February 2016 - 09:06 PM

So I'm doing a thing with LuaJ.

I'm trying to get it to load a bios file, which it seems to successfully read

But when I call it (the value returned by load string)...
program.call()  //program is the value that loadstring returned
I get this:
org.luaj.vm2.LuaError: bios.lua:1: attempt to call function
WHAT?

The file I'm trying to load looks like this:
native_write(10,10,orange,white,"test")
native_write is a function that I've implemented in Java

Edited by HPWebcamAble, 19 February 2016 - 09:18 PM.


#2 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 19 February 2016 - 09:17 PM

Update:

print() and error() work as expected, seems that my custom function is causing problems.
(print outputs to the eclipse terminal)

Any ideas?

Edited by HPWebcamAble, 19 February 2016 - 09:25 PM.


#3 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 20 February 2016 - 01:58 AM

Figured it out, was totally my fault.

Solution: Use VarArgFunction





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users