7/26/2023 0 Comments Bitburner invalid index for arrays![]() Posting code regarding objectId would be helpful too. The following example will run foo.script single-threaded with no arguments: run('foo.script') The following example will run ‘foo.script’ but with 5 threads instead of single-threaded: run('foo. It seems that objectId array has only two elements (positions 0 and 1 ), and you're trying to access to position 2 during the second iteration of for loop. If you do ns.scan('home') then you get an array from scan(), which you then put as the first element of another array, so you have an array inside of an array. The simplest way to use the run command is to call it with just the script name. Ns.disableLog("getServerRequiredHackingLevel")įor(var n=0 n ns. Using Cython, I try to do this: cpdef myFun (double : array): cdef int : sortIndices np. The script keep buying nodes until it matches the amount of (variable of quantity I want) first, then it starts to increase the stats of the first node to max then so on and so on. You'll see it is an object (arrays are objects, with keys being numbers starting from 0). if anyone knows how to compare or put in order the lists, please tell me /** ns **/ i think it is because the code sets as var mm (max money) and smm (server with max money) only at. but i encountered a problem: at the end of the code, it tells me that the best one is omega-net. is there a way to make a variable remain unchanged during the code process? i copy and paste the code text below: i wrote a code to analyze all the available servers i can connect to, looking for the one with the most value: 'MaxMoneyAvailable'. So I tried to convert an image to an array with PIL and NumPy. ![]() i think it is because the code sets as var mm (max money) and smm (server with max money) only at the end, where obviously h and k will be the last two elements of the list. Inde圎rror: Invalid Index for Scalar Variable NumPy. Nesting arrays could only happen if you werent using a variable to store the inner array because references were stored instead of values. I wrote a code to analyze all the available servers i can connect to, looking for the one with the most value: "MaxMoneyAvailable". ![]()
0 Comments
Leave a Reply. |