View Single Post
Old May 25th, 2006, 10:45 AM   #7
chillypacman
Newbie
 
Join Date: Mar 2006
Posts: 21
Rep Power: 0 chillypacman is on a distinguished road
thanks NSchnarr, however I done it another way, rather crude compared to your plan...

what I did was use ASCII values to create an array using a while loop to store all the alphabet, and I proceeded to handtype the '1337' letters, I finished it fine and it works right now.

However, I seem to have a bit of a wierd problem now, my code is working almost 100% (I get array out of bounds exception when I have spaces), however I don't know how it could be working...

What I have is an if condition, that if array1 == array2 it does something. However array1 is a variable of type int and array2 is a variable of type char, however even without typecasting it (that is without saying (char)array1 == array2), the damn thing works...

So java does automatic typecasting when it can? Or am I missing something due to lack of sleep...


Also, whenever there is a space in the sentance the thing explodes on me with an array index out of bounds exception, I tried to rectify this by making both the 1337 array and the alphabet array one higher adding <space> for them both so they can simply space themselves out when needed. However I still get the same error... I'm working on debugging it now, I think I can solve it, but then again, I would really appreciate it if someone helped out with some advice
chillypacman is offline   Reply With Quote