DOC: stock.getPrice(): typo fix in examples

Fixes #4184.  The hard-coded stock symbol `"FISG"` should be `"FSIG"`.  The updated examples do not use a hard-coded stock symbol.  The documentation is updated to explain under which circumstances a player can run the function `stock.getPrice()`.
This commit is contained in:
Duck McSouls 2022-10-01 10:07:20 +10:00
parent 5e14d07d9a
commit 4cf270138d

@ -1094,17 +1094,26 @@ export interface TIX {
* @remarks * @remarks
* RAM cost: 2 GB * RAM cost: 2 GB
* *
* The stocks price is the average of its bid and ask prices. * The stocks price is the average of its bid and ask prices. This function requires
* that you have the following:
*
* 1. WSE Account
*
* 1. TIX API Access
* *
* @example * @example
* ```ts * ```ts
* // NS1 * // NS1
* stock.getPrice("FISG"); * var sym = stock.getSymbols()[0];
* tprint("Stock symbol: " + sym);
* tprint("Stock price: " + stock.getPrice(sym));
* ``` * ```
* @example * @example
* ```ts * ```ts
* // NS2 * // NS2
* ns.stock.getPrice("FISG"); * const sym = ns.stock.getSymbols()[0];
* ns.tprint("Stock symbol: " + sym);
* ns.tprint("Stock price: " + ns.stock.getPrice(sym));
* ``` * ```
* @param sym - Stock symbol. * @param sym - Stock symbol.
* @returns The price of a stock. * @returns The price of a stock.