Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't get Lua example scripts to work
#1
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.
Reply

#2
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.
Reply

#3
(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!
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.