From ad71e5513c4c4eed1af3b102b4ac4177aefa949e Mon Sep 17 00:00:00 2001 From: Russell Stringer Date: Mon, 10 Jan 2022 16:04:07 -0500 Subject: [PATCH] Remove mention of accessing underlying port data array from .rst file Fixes #2201 --- doc/source/netscript/netscriptmisc.rst | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/doc/source/netscript/netscriptmisc.rst b/doc/source/netscript/netscriptmisc.rst index ddbee4088..e41bfc0cf 100644 --- a/doc/source/netscript/netscriptmisc.rst +++ b/doc/source/netscript/netscriptmisc.rst @@ -59,15 +59,14 @@ And the data in port 1 will look like:: .. warning:: In :ref:`netscriptjs`, do not trying writing base `Promises `_ - to a port. + to a port. **Port Handles** WARNING: Port Handles only work in :ref:`netscriptjs`. They do not work in :ref:`netscript1` The :js:func:`getPortHandle` Netscript function can be used to get a handle to a Netscript Port. -This handle allows you to access several new port-related functions and the -port's underlying data structure, which is just a JavaScript array. The functions are: +This handle allows you to access several new port-related functions. The functions are: .. js:method:: NetscriptPort.writePort(data) @@ -111,22 +110,11 @@ port's underlying data structure, which is just a JavaScript array. The function Clears all data from the port. Works the same as the Netscript function `clear` -.. js:attribute:: NetscriptPort.data - - The Netscript port underlying data structure, which is just a Javascript array. All - valid Javascript Array methods can be called on this. - Port Handle Example:: port = getPortHandle(5); back = port.data.pop(); //Get and remove last element in port - //Remove an element from the port - i = port.data.findIndex("foo"); - if (i != -1) { - port.data.slice(i, 1); - } - //Wait for port data before reading while(port.empty()) { sleep(10000);