2021-10-30 18:34:14 +02:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [CodingContract](./bitburner.codingcontract.md) > [attempt](./bitburner.codingcontract.attempt.md)
|
|
|
|
|
|
|
|
## CodingContract.attempt() method
|
|
|
|
|
|
|
|
Attempts to solve the Coding Contract with the provided solution.
|
|
|
|
|
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
2021-10-30 21:46:34 +02:00
|
|
|
attempt(answer: string | string[] | number, fn: string, host?: string): boolean;
|
2021-10-30 18:34:14 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
2021-10-30 21:46:34 +02:00
|
|
|
| answer | string \| string\[\] \| number | Solution for the contract. |
|
2021-10-30 18:34:14 +02:00
|
|
|
| fn | string | Filename of the contract. |
|
2021-10-30 21:46:34 +02:00
|
|
|
| host | string | Host or IP of the server containing the contract. Optional. Defaults to current server if not provided. |
|
2021-10-30 18:34:14 +02:00
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
|
|
|
boolean
|
|
|
|
|
|
|
|
True if the solution was correct, false otherwise.
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
2021-10-30 21:46:34 +02:00
|
|
|
10 GB
|
2021-10-30 18:34:14 +02:00
|
|
|
|