-2

hey so i keep getting a Compile Error: line 6:102 no viable alternative at character '"' error and i do not understand why. If anyone could explain this it would be great. Code follows:

public class leaderboardController {

public void describeSObjectsSample() {
  try {
      DescribeSObjectResult[] describeSObjectResults = connection.describeSObjects(new String[] { "Game__c","Game_User_Detail__c"});

  }catch(ConnectionException ce) {
      ce.printStackTrace();  
  }
}

}

Philipp Claßen
  • 41,306
  • 31
  • 146
  • 239
user1828256
  • 25
  • 1
  • 3

1 Answers1

0

Seems like an encoding problem. Even if it looks like a normal quotation mark, it can be in fact a different symbol, and that is what confuses the compiler. Maybe you have copy-pasted the code?

Try to delete the symbol and make sure to replace it by a normal quotation mark. That should fix the problem. If not, double-check whether the file contains only ASCII characters.

Philipp Claßen
  • 41,306
  • 31
  • 146
  • 239