Can't get Lua example scripts to work - Printable Version +- mGBA Forums (https://forums.mgba.io) +-- Forum: mGBA (https://forums.mgba.io/forumdisplay.php?fid=1) +--- Forum: General (https://forums.mgba.io/forumdisplay.php?fid=3) +--- Thread: Can't get Lua example scripts to work (/showthread.php?tid=5721) |
Can't get Lua example scripts to work - ColemanSloth - 08-03-2024 I'm trying to create a Lua script to alter keys in the midst of gameplay (specifically for the game Kingdom Hearts - Chain of Memories), but I can't seem to get any of the Lua scripts to work at all. I downloaded some from the GitHub repo and loaded them in the `Tools -> Scripting` window, but if I try to run them while a game is playing they'll throw errors like "attempt to index a nil value (global 'input')" for `analog-interpolate` and `gamepad-demo`, or "attempt to index a nil value (global 'image')" for `color-mask`. Is there something I'm missing here, like a script you need to run beforehand to set up these global variables, or am I only supposed to run these against an example ROM or something? I've tried for over an hour now to find documentation, but all I can find is the Scripting API and the example Lua snippets. Would greatly appreciate any help or advice. RE: Can't get Lua example scripts to work - endrift - 08-04-2024 Those examples only work on mGBA 0.11 dev builds because they use features that were added after 0.10. The demo scripts that work with 0.10 are the ones distributed with the program. RE: Can't get Lua example scripts to work - ColemanSloth - 08-04-2024 (08-04-2024, 08:59 AM)endrift Wrote: Those examples only work on mGBA 0.11 dev builds because they use features that were added after 0.10. The demo scripts that work with 0.10 are the ones distributed with the program. Thank you! |