mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
31 lines
836 B
Markdown
31 lines
836 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|||
|
|
|||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [prompt](./bitburner.ns.prompt.md)
|
|||
|
|
|||
|
## NS.prompt() method
|
|||
|
|
|||
|
Prompts the player with a dialog box with two options: “Yes” and “No”. This function will return true if the player click “Yes” and false if the player clicks “No”. The script’s execution is halted until the player selects one of the options.
|
|||
|
|
|||
|
<b>Signature:</b>
|
|||
|
|
|||
|
```typescript
|
|||
|
prompt(txt: string): Promise<boolean>;
|
|||
|
```
|
|||
|
|
|||
|
## Parameters
|
|||
|
|
|||
|
| Parameter | Type | Description |
|
|||
|
| --- | --- | --- |
|
|||
|
| txt | string | Text to appear in the prompt dialog box. |
|
|||
|
|
|||
|
<b>Returns:</b>
|
|||
|
|
|||
|
Promise<boolean>
|
|||
|
|
|||
|
True if the player click “Yes” and false if the player clicks “No”.
|
|||
|
|
|||
|
## Remarks
|
|||
|
|
|||
|
0 GB
|
|||
|
|