In game Bitburner Can I access the return value of a script somehow ?
- User
In game Bitburner Can I access the return value of a script somehow ?
- Assistant
Yes, you can access the return value of a script by using the 'returnValue' variable. This variable will contain the value that the script returns.
- User
Specific use case: I wrote a script distribute-threads.js, which takes a script_name and a given number of threads num_threads, and tries to launch a total of num_threads of script_name, distributed on a bunch of hacked servers. Then it was meant to return the number of threads it was actually able to launch, so that whichever script called distribute-threads.js could decide what to do if the number of launched threads was lower than the number of requested threads num_threads.
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.