08-03-2024, 05:50 PM
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.
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.