Ok, classic n00b question:
The following snippet of code is from a socket based text game (yeah, yeah, ANOTHER mud…) I can’t make the server understand the input from the user. I can replace the entire if statement with out.println(Command) and it will echo whatever you type to it, but if you try to perform an operation on the Command (compare it to say “q”, quitting if it matches) it simply ignores the input. What am I doing wrong?
while((Command = in.readLine()) != null){
if(Command == "q"){
[b]do something[/b]
};
}
Regards, ???