Closed GoogleCodeExporter closed 9 years ago
Original comment by adeli...@tasvideos.org
on 17 Sep 2012 at 10:47
The script doesn't work because joypad.set() is invoked incorrectly. Doesn't
seem like http://tasvideos.org/Bizhawk/LuaFunctions.html is correct on this
matter, so here's the function:
nil joypad.set (table buttons, number controller)
any non-nil non-false values in buttons are set to clicked in the next frame.
for a list of appropriate keys, try joypad.get() this function can't toggle or
unset an input.
controller should be a number corresponding to player number, or nil for
"system" controls (reset buttons mostly)
As far as fixing the vague error message goes, for the technically inclined:
LuaInterface throws a LuaScriptException with Source == null. I didn't think
it could do this and don't know how to remedy the problem. Normally, Source
would tell us where the problem occurred...
Original comment by goyu...@gmail.com
on 23 Sep 2012 at 10:13
need to add stacktrace printing error handler to pcall
Original comment by zero...@zeromus.org
on 23 Sep 2012 at 10:17
Also, this exception in particular occurs because a table is attempted to get
coerced to an int by LuaInt (or the other way around) for the argument to
joypad_set but LuaInterface just barfs and explodes. still, with a stacktrace,
we couldve seen where that happened from.
Original comment by zero...@zeromus.org
on 23 Sep 2012 at 10:21
Original comment by adeli...@tasvideos.org
on 29 Sep 2012 at 2:36
Since this issue was opened, a stack trace has been added to lua exceptions,
and this script outputs the correct error "Invalid arguments to method call"
and a line number in the script.
Original comment by adeli...@tasvideos.org
on 27 Apr 2014 at 12:42
Original issue reported on code.google.com by
brandman...@gmail.com
on 10 Sep 2012 at 9:02