invitro
Aug 22nd, 2000, 09:53 PM
private void cheat_keyPress(Object source, KeyPressEvent e)
{
char c_char;
c_char = e.getKeyChar();
if(c_char == 13) {
String c_code;
String c_parse;
String c_get;
Form1 mon = new Form1();
long c_line;
c_code = cheat.getText();
c_get = c_code.substring(0,5);
if(c_get.substring(0,c_get.length()) == "money") {
c_parse = c_code.substring(6,c_code.length());
super.close();
c_line = Integer.valueOf(c_parse).intValue();
mon.addmoney(c_line,true);
cheat.setText(c_parse + "testing phase 1");
}
}
}
Whats wrong with this code? The second if wont execute, the first 1 will. ***!
{
char c_char;
c_char = e.getKeyChar();
if(c_char == 13) {
String c_code;
String c_parse;
String c_get;
Form1 mon = new Form1();
long c_line;
c_code = cheat.getText();
c_get = c_code.substring(0,5);
if(c_get.substring(0,c_get.length()) == "money") {
c_parse = c_code.substring(6,c_code.length());
super.close();
c_line = Integer.valueOf(c_parse).intValue();
mon.addmoney(c_line,true);
cheat.setText(c_parse + "testing phase 1");
}
}
}
Whats wrong with this code? The second if wont execute, the first 1 will. ***!