mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 22:22:26 +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;
|
return cost;
|
||||||
},
|
},
|
||||||
purchaseServer: function (aname: any, aram: any): any {
|
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 name = helper.string("purchaseServer", "name", aname);
|
||||||
const ram = helper.number("purchaseServer", "ram", aram);
|
const ram = helper.number("purchaseServer", "ram", aram);
|
||||||
updateDynamicRam("purchaseServer", getRamCost(Player, "purchaseServer"));
|
updateDynamicRam("purchaseServer", getRamCost(Player, "purchaseServer"));
|
||||||
|
Loading…
Reference in New Issue
Block a user