Error on Heyzap Documentation

I’m building a game using C# and for the ads I use Heyzap for Unity3d. I have managed to get the SDK, add it as a plugin and show an Interstitial Ad. Now I wanted to use the advanced part(callbacks) in their documentation but just copying the code gives me two weird errors: error CS1519: Unexpected symbol `(’ in class, struct, or interface member declaration, and the sibling one with ‘)’ character. I also checked their class and it seems that is a function, so I’m in a dead end.

Here’s my code:

using UnityEngine;
using System.Collections;

public class AdsController : MonoBehaviour {

void Start () {
	HeyzapAds.start("*doesn't matter*", HeyzapAds.FLAG_NO_OPTIONS);


HZInterstitialAd.AdDisplayListener listener = delegate(string adState, string adTag){
	if ( adState.Equals("show") ) {
    // Do something when the ad shows, like pause your game
	if ( adState.Equals("hide") ) {
    // Do something after the ad hides itself
	if ( adState.Equals("click") ) {
    // Do something when an ad is clicked on
	if ( adState.Equals("failed") ) {
    // Do something when an ad fails to show
	if ( adState.Equals("available") ) {
    // Do something when an ad has successfully been fetched
	if ( adState.Equals("fetched_failed") ) {
    // Do something when an ad did not fetch
	if ( adState.Equals("audio_starting") ) {
    // The ad being shown will use audio. Mute any background music
	if ( adState.Equals("audio_finished") ) {
    // The ad being shown has finished using audio.
    // You can resume any background music.

HZInterstitialAd.setDisplayListener (listener);

The error seems to be at the last line(HZInterstitialAd.setDisplayListener (listener);).

Here you can find Heyzap documentation.

Any suggest would help. Thanks

How much do I have to wait for aproval??? this is insane.

The problem seems unrelated to Heyzap. You have a syntax error in your code. The function you call on line 43 is being called completely outside any other function. I would suggest moving it into your void Start() method.