From b793232c972ac07923f6ed4389d0262ac91e6ed3 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 17 Apr 2016 17:38:16 -0500 Subject: plugins/cheat: clear popmessage (nw) --- plugins/cheatfind/init.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'plugins/cheatfind') diff --git a/plugins/cheatfind/init.lua b/plugins/cheatfind/init.lua index c72fc95edac..69fd9346800 100644 --- a/plugins/cheatfind/init.lua +++ b/plugins/cheatfind/init.lua @@ -243,8 +243,8 @@ function cheatfind.startplugin() matchsel = 1 menu_blocks = {} - table = cheat.getspaces() - for tag, list in pairs(table) do + local space_table = cheat.getspaces() + for tag, list in pairs(space_table) do if list.program then local ram = {} for num, entry in pairs(list.program.map) do @@ -257,8 +257,8 @@ function cheatfind.startplugin() end end end - table = cheat.getram() - for tag, ram in pairs(table) do + space_table = cheat.getram() + for tag, ram in pairs(space_table) do devtable[#devtable + 1] = { tag = tag, space = ram.dev, ram = {{ offset = 0, size = ram.size }} } end end @@ -484,10 +484,12 @@ function cheatfind.startplugin() _G.ce.inject(cheat) end else + local filename = string.format("%s_%08x_cheat.json", emu.romname(), match.addr) local json = require("json") - local file = io.open(string.format("%s_%08x_cheat.json", emu.romname(), match.addr), "w") + local file = io.open(filename, "w") file:write(json.stringify(cheat)) file:close() + manager:machine():popmessage("Cheat written to " .. filename) end end end -- cgit v1.2.3