Code: Select all
public void handleClientRequest(User sender, ISFSObject params)
{
String name = params.getUtfString("zoneSelected");
ISFSObject response = new SFSObject();
if(name == "zone1")
{
response.putUtfString("zonedata", "1,5,25");
}
send("getGameZone", response, sender);
}
The code is above. The issue I cannot figure out is why the variable name does not equal “zone1” when in the trace for the server and on the client says that the name variable has “zone1” in it. It is successful in sending the information from the client to the server, the extension accepts it, but the if statement doesn’t activate, which means in theory they are not equal. How are they not equal when the trace for name is “zone1”? Do I need to convert the string from the ISFSObject if so how?
I have put traces in the if statement as well even though there are no traces in the code above. The trace does not activate and the SFSObject received has no data in it since the if statement did not activate.