mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-28 17:07:32 +01:00
36 lines
950 B
Markdown
36 lines
950 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getRecentScripts](./bitburner.ns.getrecentscripts.md)
|
||
|
|
||
|
## NS.getRecentScripts() method
|
||
|
|
||
|
Get an array of recently killed scripts across all servers.
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
getRecentScripts(): RecentScript[];
|
||
|
```
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
[RecentScript](./bitburner.recentscript.md)<!-- -->\[\]
|
||
|
|
||
|
Array with information about previously killed scripts.
|
||
|
|
||
|
## Remarks
|
||
|
|
||
|
RAM cost: 0.2 GB
|
||
|
|
||
|
The most recently killed script is the first element in the array. Note that there is a maximum number of recently killed scripts which are tracked. This is configurable in the game's options as `Recently killed scripts size`<!-- -->.
|
||
|
|
||
|
## Example
|
||
|
|
||
|
|
||
|
```ts
|
||
|
let recentScripts = ns.getRecentScripts();
|
||
|
let mostRecent = recentScripts.shift()
|
||
|
if (mostRecent)
|
||
|
ns.tprint(mostRecent.logs.join('\n'))
|
||
|
```
|
||
|
|