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, in game Bitburner you can access the return value of a script using the
getReturn()function. This function can be called on theScriptableObjectobject that contains the script, and will return the value of the script's return variable. - 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.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.