TASEmulators / TASEmulators/BizHawk
Lua Functions: On Copy of a Row Remove C Style Comment / Maybe Change Parameter Name in Ex
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
In the Lua Functions grid if you right-click and copy the row to get a quick example it is copied in a format that is not completely compatible with Lua. "//" should be replaced with "--" otherwise a user gets NLua.Exceptions.LuaScriptException: [string "main"]:51: unexpected symbol near '/'.
A couple other things I have to question. The "Frame name" is the event name if you want to use that function name to remove, but the name should most likely be "Event Name" in these examples. local "steveonm" seems an odd variable name as well to me for something would contain a GUID for an event in case you wanted to identify it later such as for removal later with the event unregisterbyid.

//event.onmemoryexecute(nluafunc luaf, uint address, [string name = null], [string scope = null])
local steveonm = event.onmemoryexecute(
function()
console.log( "Fires after the given address is executed by the core" );
end
, 0x200, "Frame name", "System Bus" );
--another example of a copy below
//event.onsavestate(nluafunc luaf, [string name = null])
local steveons = event.onsavestate(
function()
console.log( "Fires after a state is saved" );
end
, "Frame name" );
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Lua Functions grid and reproduce the issue by right-clicking a row and copying its example. Verify that the copied examples use Lua-compatible comments and that the displayed parameter labels and local variable names accurately describe their purpose.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, lua
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100