DOCUMENTATION: Fix incorrect cloud API example (#2738)

This commit is contained in:
catloversg
2026-05-07 04:30:48 +07:00
committed by GitHub
parent 15a67d0156
commit a7b34b110c
2 changed files with 2 additions and 2 deletions
@@ -37,7 +37,7 @@ Common infinite loop when translating the server purchasing script in starting g
let i = ns.cloud.getServerNames().length;
while (i < ns.cloud.getServerLimit()) {
if (ns.getServerMoneyAvailable("home") > ns.cloud.getRamLimit(ram)) {
if (ns.getServerMoneyAvailable("home") > ns.cloud.getServerCost(ram)) {
const hostname = ns.cloud.purchaseServer("cloud-server-" + i, ram);
ns.scp("early-hack-template.js", hostname);
ns.exec("early-hack-template.js", hostname, 3);