function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mhlangano KhumaloMhlangano Khumalo 

Error: Compile Error: unexpected token: ')' at line 15 column 18. Help!!!

User-added image
Best Answer chosen by Mhlangano Khumalo
Amit Chaudhary 8Amit Chaudhary 8
Issue in your code is that you are adding full code in apex class only. Please create one method and add your code there. Like below:-

public class AccountCallout
{
    DataType var;
    DataType var;

   public void methodName()
   {
      add you code here.....
   }
}

Let us know if this will help you
 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Issue in your code is that you are adding full code in apex class only. Please create one method and add your code there. Like below:-

public class AccountCallout
{
    DataType var;
    DataType var;

   public void methodName()
   {
      add you code here.....
   }
}

Let us know if this will help you
 
This was selected as the best answer
RaidanRaidan
You have to put your code inside a method.
Mhlangano KhumaloMhlangano Khumalo
Thanks Amit & Raidan.