problems with iAD banner

as it says im having problems putting a simple iAD banner at the bottom of my screen, for some reason i get errors in the code a lot of them even when i use the standard unity doc code, any help please.

HERES THE CODE

private var banner : ADBannerView = null;

    

function ShowBanner() {

    while (!banner.loaded && banner.error == null)

        yield;

        

    if (banner.error == null)

        banner.Show();

    else banner = null;

}

 

function OnGUI() {

    GUI.enabled = (banner == null ? true : false);

    

    if (GUILayout.Button("Show Banner")) {

        banner = new ADBannerView();

        banner.autoSize = true;

        banner.autoPosition = ADPosition.Bottom;

        StartCoroutine(ShowBanner());

    }

}

In unity 4.3 all iad code was rewritten and this code wont work and will give you errors

use this link-

https://docs.unity3d.com/Documentation/ScriptReference/ADBannerView.html