# Kongregate Stats Problem

**URL:** <https://forum.kirupa.com/t/kongregate-stats-problem/302116>\
**Category:** flash\
**Created:** [December 22, 2009, 3:37am UTC](https://forum.kirupa.com/t/kongregate-stats-problem/302116 "2009-12-22T03:37:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcapecci](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@bcapecci](https://forum.kirupa.com/u/bcapecci)\
**Post date:** [December 22, 2009, 3:37am UTC](https://forum.kirupa.com/t/kongregate-stats-problem/302116/1 "2009-12-22T03:37:32Z")

</div>

```auto

public function loadAPI()
        {
          var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
          var api_url:String = paramObj.api_path || "http://www.kongregate.com/flash/API_AS3_Local.swf";
          var request:URLRequest = new URLRequest ( api_url );
          var loader:Loader = new Loader();
          loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, apiLoadComplete );
          loader.load ( request );
          this.addChild ( loader );
        }

```

I get a null reference error on this line:  
var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;

Anybody know what I should do. I was just following the tutorial to implement it. I don’t quit understand that part of the code so I cannot fix it myself. Do I have to download something for the api to work? Thanks a bunch. Hopefully this can be fixed tonight because I need to add highscores to my game.
