Jump to content

ArrayToString only row 0


Go to solution Solved by someone,

Recommended Posts

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

How does your array $rFileList look like?

Br,

UEZ

Edited 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

  • Solution

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

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 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...