Hi, I'm making a fighting game and am currently making the multiplayer componenet. At this point i am trying to synchronise the move array and the character stats array between the client and the server. The connection is made and all is fine there, but when i try to sync the arrays i get a crash.

Here is the code that causes the crash.

Code:
 function init_remote_player(button_number,pan)  {
snd_PLAY(click_sound,100,0);
if (button_number == 1) {
i = 0;
j = 0;
if (connection == 3) {
while (i < human_stats.length) {
human_stats[i] = balanced_human[i];
send_var(human_stats[i]);
i+=1;
}
}
if (connection == 2) {
while (j < human2_stats.length) {
human2_stats[j] = balanced_human[j];
send_var(human2_stats[j]);
j+=1;
}



The code continues in a similar fashion for the other buttons.

If i click the button from the server, the client crashes.
If i click the button from the client, the server crashes.

Any ideas?

I've used send_var in prior code and it works great.

TIA,

JakeShields