JS Grr…..
Well recently JS has been giving me some trouble, My current obstacle is a translator that replaces letters in the alphabet to create a simple form of encryption. My problem is that I have a numeric based system that I call Alphabetical Numeric Codec, whenever I invoke L3 of the encryption it treats A as 1, I am deeply confused, here was my first theory:
L3 is a level that transforms the letters into numbers, so, perhaps when A gets transformed it turns into numbers, and then perhaps when numbers get transformed it the encoded A into an encoded 1. I am still rather confused though, because when I deleted the number conversion units the letter A turned into something that was not even specified within the JS function.
I am going to be doing experiments shortly to try and find the problem
~Geo Larsnick
Update:
AHA! It turns out my invoking methods were doing two functions at once! Thus making my original theory semi-correct, in that is it, turning the letters into numbers into letters. It also explains a problem I was having with an invoke method, L4 would not even commence!
Happy coding all whom can understand this
Another Update:
Here:
if (SI2 == 2)
{
if (L == 1)
{
Invoke (”translate3″, 0);
}
if (L == 2)
{
Invoke (”translate4″, 0);
}
if (L == 3)
{
Invoke (”dd”, 0);
}
if (L == 3)
{
Invoke (”translate6″, 0);
}
}
that was my invoke function, if you look closer..
if (L == 3)
{
Invoke (”dd”, 0);
}
if (L == 3)
{
Invoke (”translate6″, 0);
}
You will see that when L = 3 it invoked both dd, and translate 6, I discovered this while pouring over my code to do testing.
this also explains why when L = 4 it was not invoking translate 6.
As I said happy coding! (sorry Aubrey, but your saying is too good not to be stolen
)
~ Geo Larsnick
LOL! looks like L4 needs some work:
before translation: Your Text Goes Here
Translation: /jg’//fg//ia//gi/-/hg’//b/ce///jc//hg/-/ce’//fg//b/ce///hc/-/ci’//b/ce///gi//b/ce//
after retranslation to english: Your T/bg/xt Go/bg/s H/bg/r/bg/
I found one of the problems….
text = text.Replace(”a”, “/a/”);
text = text.Replace(”b”, “/e/”);
text = text.Replace(”c”, “/i/”);
text = text.Replace(”d”, “/bc/”);
text = text.Replace(”e”, “/bg/”);
if you look closely, b turns into /e/, and then /e/ gets turned into //bg//, then who knows what //bg// gets turned into… Perhaps reversing the order in which all the characters are replaced will help. For now I am just going to lock down that function.