Addressing feedback.

`flags` example should have the output, instead of the code, in a comment block. `formulas.basic.calculateExp` and `formulas.basic.hackChance` should have explicit `var` declarations.
This commit is contained in:
MageKing17
2021-07-04 08:10:55 -07:00
committed by danielyxie
parent 43b09a2459
commit 04c0c87242
3 changed files with 8 additions and 7 deletions

View File

@@ -18,8 +18,8 @@ calculateExp() Netscript Function
.. code-block:: javascript
player = getPlayer();
nextHacking = player.hacking_skill+1;
nextExp = formulas.basic.calculateExp(nextHacking);
missingExp = nextExp - player.hacking_exp;
var player = getPlayer();
var nextHacking = player.hacking_skill+1;
var nextExp = formulas.basic.calculateExp(nextHacking);
var missingExp = nextExp - player.hacking_exp;
tprint("Missing " + missingExp + " to reach next hacking level");

View File

@@ -20,6 +20,6 @@ hackChance() Netscript Function
.. code-block:: javascript
server = getServer();
var server = getServer();
server.hackDifficulty = server.minDifficulty;
tprint(formulas.basic.hackChance(server, getPlayer()));