mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
work on making the netscript api tighter
This commit is contained in:
@@ -9,7 +9,7 @@ Attemps a coding contract.
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
attempt(answer: string[] | number, fn: string, host?: string): boolean;
|
||||
attempt(answer: string[] | number, fn: string, host?: string, opts?: CodingAttemptOptions): boolean | string;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -19,12 +19,13 @@ attempt(answer: string[] | number, fn: string, host?: string): boolean;
|
||||
| answer | string\[\] \| number | Solution for the contract. |
|
||||
| fn | string | Filename of the contract. |
|
||||
| host | string | Host of the server containing the contract. Optional. Defaults to current server if not provided. |
|
||||
| opts | [CodingAttemptOptions](./bitburner.codingattemptoptions.md) | Optional parameters for configuring function behavior. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
boolean
|
||||
boolean \| string
|
||||
|
||||
True if the solution was correct, false otherwise.
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user