...

View Full Version : array and fromCharCode problem [solved]...



MogVonKupo
04-17-2005, 08:17 PM
I'm translating something I've already written in visual basic and vbscript to javascript, but this bit of code gives me an error...



for(i=0; i<=5; i++){
for(j=0; j<=5; j++){
strdecrypt[i,j]=intdecrypt[(6 * i) + j].fromCharCode();
}
}


if the .fromCharCode() is commented, it don't return an error, but I need it or something that would do the exact same thing

here are the arrays declarations (i've kept the vb naming convention)


var intdecrypt = new Array(35);
var strdecrypt = new Array(5,5);


intdecrypt have the charcodes and they must be sent as characters to strdecrypt

thanks for your help



strdecrypt[i,j]=String.fromCharCode(intdecrypt[(6 * i) + j]);


i had some real bad syntax... the last bit of code is the solution...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum