diff --git a/doc/source/netscript/basicfunctions/flags.rst b/doc/source/netscript/basicfunctions/flags.rst index d37675c37..7f47419e2 100644 --- a/doc/source/netscript/basicfunctions/flags.rst +++ b/doc/source/netscript/basicfunctions/flags.rst @@ -22,7 +22,7 @@ flags() Netscript Function .. code-block:: javascript - /* example.script + // example.script var data = flags([ ['delay', 0], // a default number means this flag is a number ['server', 'foodnstuff'], // a default string means this flag is a string @@ -30,7 +30,7 @@ flags() Netscript Function ['help', false], // a default boolean means this flag is a boolean ]); tprint(data); - */ + /* [home ~/]> run example.script {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false} [home ~/]> run example.script --delay 3000 @@ -43,3 +43,4 @@ flags() Netscript Function {"_":["hello","world"],"help":false,"delay":3000,"server":"harakiri-sushi","exclude":["a","b"]} [home ~/]> run example.script --help {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true} + */ diff --git a/doc/source/netscript/formulasapi/basic/calculateExp.rst b/doc/source/netscript/formulasapi/basic/calculateExp.rst index cc715f246..1c27027fb 100644 --- a/doc/source/netscript/formulasapi/basic/calculateExp.rst +++ b/doc/source/netscript/formulasapi/basic/calculateExp.rst @@ -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"); diff --git a/doc/source/netscript/formulasapi/basic/hackChance.rst b/doc/source/netscript/formulasapi/basic/hackChance.rst index c0515383b..04a617bad 100644 --- a/doc/source/netscript/formulasapi/basic/hackChance.rst +++ b/doc/source/netscript/formulasapi/basic/hackChance.rst @@ -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()));