NETSCRIPT: A minorly breaking change around script launch, and refactoring. (#1213)

This commit is contained in:
David Walker
2024-04-23 17:21:05 -07:00
committed by GitHub
parent 7a1fce6f64
commit 384d1c1a2b
24 changed files with 48 additions and 66 deletions

View File

@@ -9,12 +9,7 @@ Start another script on any server.
**Signature:**
```typescript
exec(
script: string,
hostname: string,
threadOrOptions?: number | RunOptions,
...args: (string | number | boolean)[]
): number;
exec(script: string, hostname: string, threadOrOptions?: number | RunOptions, ...args: ScriptArg[]): number;
```
## Parameters
@@ -24,7 +19,7 @@ exec(
| script | string | Filename of script to execute. This file must already exist on the target server. |
| hostname | string | Hostname of the <code>target server</code> on which to execute the script. |
| threadOrOptions | number \| [RunOptions](./bitburner.runoptions.md) | _(Optional)_ Either an integer number of threads for new script, or a [RunOptions](./bitburner.runoptions.md) object. Threads defaults to 1. |
| args | (string \| number \| boolean)\[\] | Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument threadOrOptions must be filled in with a value. |
| args | [ScriptArg](./bitburner.scriptarg.md)<!-- -->\[\] | Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument threadOrOptions must be filled in with a value. |
**Returns:**