bitburner-src/markdown/bitburner.ns.prompt.md

33 lines
886 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [prompt](./bitburner.ns.prompt.md)
## NS.prompt() method
Prompt the player with a Yes/No modal.
<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&lt;boolean&gt;
True if the player click “Yes” and false if the player clicks “No”.
## Remarks
RAM cost: 0 GB
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 scripts execution is halted until the player selects one of the options.