SineCosine
I'm still looking for my Tangent
- Reaction score
- 77
I made this blog dedicated to providing information about a music game.
There is a section with the game's Song List.
The Song List contains the following information:
And so, I have 7 arrays each storing their respective data.
Each array element has a method (Do you call it that?) 'index' that tells them what their index is.
Users can choose to select to sort the song list according to:
When they click a button, it calls a function that copies that array into a variable using the [ljass]array.concat()[/ljass] method.
Then, it sorts and passes the copied&sorted array into a different function that draws the table according to the sorted array.
That table drawing function is the problem here.
[ljass]function drawTable (arraySource)[/ljass]
At some point, I need to reference arraySource.
It works fine in Mozilla Firefox.
However, in Google Chrome, I get a blank error message with the [ljass]try {} catch(e) { alert(e); }[/ljass] approach.
But I am guessing that fromSource is undefined in Chrome.
So, I would like to know if anyone knows the proper way to handle arrays across all browsers =x
-tl;dr Version-
I can't pass an array variable into a function in Chrome.
I can with Firefox.
Help me.
There is a section with the game's Song List.
The Song List contains the following information:
- Artist Name
- Song Name
- Location
- Single (A difficulty type)
- Double (A difficulty type)
- Single Performance (A difficulty type)
- Double Performance (A difficulty type)
And so, I have 7 arrays each storing their respective data.
Each array element has a method (Do you call it that?) 'index' that tells them what their index is.
Users can choose to select to sort the song list according to:
- Artist Name
- Song Name
- Location
- Single (A difficulty type)
- Double (A difficulty type)
- Single Performance (A difficulty type)
- Double Performance (A difficulty type)
When they click a button, it calls a function that copies that array into a variable using the [ljass]array.concat()[/ljass] method.
Then, it sorts and passes the copied&sorted array into a different function that draws the table according to the sorted array.
That table drawing function is the problem here.
[ljass]function drawTable (arraySource)[/ljass]
At some point, I need to reference arraySource.
- fromSource.length
- fromSource[loop].index
It works fine in Mozilla Firefox.
However, in Google Chrome, I get a blank error message with the [ljass]try {} catch(e) { alert(e); }[/ljass] approach.
But I am guessing that fromSource is undefined in Chrome.
So, I would like to know if anyone knows the proper way to handle arrays across all browsers =x
-tl;dr Version-
I can't pass an array variable into a function in Chrome.
I can with Firefox.
Help me.