work on making the netscript api tighter

This commit is contained in:
Olivier Gagnon
2021-11-03 20:19:52 -04:00
parent c5fb5155f3
commit 14150d3e33
270 changed files with 11011 additions and 1273 deletions
+4 -3
View File
@@ -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 contracts reward. Otherwise, it will be an empty string.
## Remarks