×

To be able to write in the forum you need to authenticate. Meanwhile it's read-only.

Change History

Request new methods needed to make challenge checkers. One method request per thread please.

Message: Re: Accessing Public Attributes in PGC API Calls

Changed By: pieterix
Change Date: June 12, 2021 02:20PM

Re: Accessing Public Attributes in PGC API Calls
Do you mean this?

local args = {...}
local env = args[1].environmentSettings

PGC.print(env.maxExecutionTime)

local deadline = os.time()+env.maxExecutionTime-5

to end:

if (os.time > deadline) then
"abort"
end

Original Message

Author: pieterix
Date: June 12, 2021 02:18PM

Re: Accessing Public Attributes in PGC API Calls
Do you mean this?

local args = {...}
local env = args[1].environmentSettings

PGC.print(env.maxExecutionTime)