A namespace can only contain types and namespace declarations

Hello,

I’m trying to integrate adbuddiz in my Android app. I’ve looked at this tutorial that shows how to integrate it:

Part 1: Adbuddiz Tutorial Part1 - Initialize Adbuddiz plugin Sdk and integrate it with game - YouTube
Part 2: Adbuddiz Tutorial Part2 - Configure adds using Adbuddiz based on a defined display criteria - YouTube

In part 2, he puts some lines of code on one of his scripts. I’m using a different script. When I put those lines of code, I get this error:

error CS0116: A namespace can only contain types and namespace declarations

Here is the script:

using UnityEngine;
using System.Collections;

public static int AdsCounts =0; 
public class PlayButtonTween : MonoBehaviour {

	// Use this for initialization
	void Start () {
		iTween.ScaleTo (gameObject, iTween.Hash ("scale", new Vector3 (1.06f, 1.06f, 0), "time", 0.5f, "easetype", iTween.EaseType.linear, "looptype", iTween.LoopType.pingPong));

		AdsCount += 1;
		
		if (AdsCount > 2) {
			AdBuddizBinding.ShowAd();
			AdsCount=0;
		}
	}
	 
}

It tells me the error on the line 4. I’m not really good at coding. If you know how to fix this please tell me. Help Would be appreciated.

This:

public static int AdsCounts =0; 

Needs to be inside the class declaration. Move to line 6.