cookiemonster Posted January 30, 2014 Share Posted January 30, 2014 Im trying take the first row of my array and put it in a variable: When I run the following it gives me the full array in a string, not just row 0 $default = _ArrayToString($rFileList, "", 0, 0) But when I run it for row 1, then it give me only row 1 $default = _ArrayToString($rFileList, "", 1, 1) Why cant I put row 0 into a string? why does it return the full array into the string? Link to comment Share on other sites More sharing options...
UEZ Posted January 30, 2014 Share Posted January 30, 2014 (edited) How does your array $rFileList look like? Br, UEZ Edited January 30, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
cookiemonster Posted January 30, 2014 Author Share Posted January 30, 2014 $rFileList is an array, so for example: Row|Col 0 [0]|000 - aaa [1]|000 - bbb [2]|000 - ccc Link to comment Share on other sites More sharing options...
Solution someone Posted January 30, 2014 Solution Share Posted January 30, 2014 Are you trying to take a 1 dimensional array and use the 0 row variable? If so, just $var = $rFileList[0] I would assume _ArraytoString would work with 0 as start and 0 as end, but as you indicated giving it 0 , 0 returns the full string deliminated value of the array, not just row 0 If you aren't using a 1 dim array respond back, you can't use arraytostring with 2 dim arrays anyway, but I can give an example if your confused. While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd Link to comment Share on other sites More sharing options...
UEZ Posted January 30, 2014 Share Posted January 30, 2014 (edited) The _ArrayToString() interprets the 0 for the end bound differently. That means 0 gets all values -> 0, 0 is not possible to get only array[0]. For array[0] you have to do it manually. Br, UEZ Edited January 30, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
cookiemonster Posted January 30, 2014 Author Share Posted January 30, 2014 that looks terrible Row|Col 0 [0]000 - aaa [1]|000 - bbb [2]|000 - ccc thats what it looks like Link to comment Share on other sites More sharing options...
cookiemonster Posted January 30, 2014 Author Share Posted January 30, 2014 'Someone' that worked brilliantly, dont know why i didnt think of that... im always trying to overcomplicate things! cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now