Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.26 KB

bitburner.codingcontract.attempt.md

File metadata and controls

35 lines (21 loc) · 1.26 KB

Home > bitburner > CodingContract > attempt

CodingContract.attempt() method

Attemps a coding contract.

Signature:

attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;

Parameters

Parameter Type Description
answer string[] | number Solution for the contract.
filename string
host string Host of the server containing the contract. Optional. Defaults to current server if not provided.
opts CodingAttemptOptions Optional parameters for configuring function behavior.

Returns:

boolean | string

True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.

Remarks

RAM cost: 10 GB

Attempts to solve the Coding Contract with the provided solution.