mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
UI: Fix incorrect information given in pserv upgrade error msg. (#1602)
This commit is contained in:
parent
818d7446be
commit
8d9f63f49f
@ -47,7 +47,7 @@ export const getPurchasedServerUpgradeCost = (hostname: string, ram: number): nu
|
||||
if (isNaN(ram) || !isPowerOfTwo(ram) || !(Math.sign(ram) === 1))
|
||||
throw new Error(`${ram} is not a positive power of 2`);
|
||||
if (server.maxRam >= ram)
|
||||
throw new Error(`'${hostname}' current ram (${server.maxRam}) is not bigger than new ram (${ram})`);
|
||||
throw new Error(`The new ram of '${hostname}' (${ram}) must be bigger than its current ram (${server.maxRam}).`);
|
||||
return getPurchaseServerCost(ram) - getPurchaseServerCost(server.maxRam);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user