|
Debugging a script? June 02, 2023 01:14AM |
Registered: 7 years ago Posts: 1,255 |
|
Re: Debugging a script? June 23, 2023 03:50PM |
Registered: 7 years ago Posts: 1,255 |
-- Include penlight, which includes Date, etc.
require("pl.init")
-- The script_input.lua file contains the parameters for the input...
require ("script_input")
-- Define the PGC interface (most of which is not implemented)
Interface = {}
function Interface:new(o)
o = o or {} -- create object if user does not provide one
setmetatable(o, self)
self.__index = self
return o
end
function Interface:GetFinds (profileId, params)
-- Returns an associative array with the finds from given profileId. More...
error("Not implemented")
end
function Interface:GetHides (profileId, params)
-- Returns an associative array with the hides from given profileId. More...
error("Not implemented")
end
-- ... continue with all the API functions
PGC = Interface:new()
args = { { profileId = script_input[2], profileName = script_input[3], gccode= script_input[4], config = script_input[5], } }
local result = require(script_input[1])
script_input =
{
"blah", -- the name of the script on disk you want to debug.
12345, -- profileId
"bmuzzin", -- profileName
"GC12345", -- gccode
{ -- "config" parameter
debug=true,
}
}
local args = args or {...} -- used to be just {...}