mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 02:03:58 +01:00
Add user-friendly invalid argument number message to purchaseServer
This commit is contained in:
parent
9ddb1c4379
commit
db5476ebd0
@ -1628,6 +1628,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return cost;
|
||||
},
|
||||
purchaseServer: function (aname: any, aram: any): any {
|
||||
if (arguments.length !== 2) throw makeRuntimeErrorMsg("purchaseServer", "Takes 2 arguments");
|
||||
const name = helper.string("purchaseServer", "name", aname);
|
||||
const ram = helper.number("purchaseServer", "ram", aram);
|
||||
updateDynamicRam("purchaseServer", getRamCost(Player, "purchaseServer"));
|
||||
|
Loading…
Reference in New Issue
Block a user