mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
doc function updates and additions (#387)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
renamePurchasedServer() Netscript Function
|
||||
===================================
|
||||
|
||||
.. js:function:: renamePurchasedServer(hostname, newName)
|
||||
|
||||
:RAM cost: 2 GB
|
||||
:param string hostname: Hostname of the purchased server.
|
||||
:param string newName: New name for the given server.
|
||||
:returns: ``true`` if the renaming was succesful.
|
||||
|
||||
Upgrades the purchased server with the specified hostname to have specified amount of RAM.
|
||||
|
||||
The ``hostname`` argument can be any data type, but it will be converted to
|
||||
a string and have whitespace removed. New RAM amount has to be higher than the current RAM
|
||||
and a power of 2. Upgrading a server costs the difference of old RAM server cost and new RAM
|
||||
server cost.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
ns.renamePurchasedServer("server", "old_server");
|
||||
Reference in New Issue
Block a user