Error on HSController.js

I've gotten the server side highscores script from the Unity Wiki and I'm getting an error when I run it in my game.

here is the error I receive:

InvalidCastException: Cannot cast from source type to destination type.
HSController+postScore$12+$.MoveNext ()   (at Assets\Scripts\HSController.js:15)

And here is the line that the error refers to:

 var highscore_url = addScoreUrl + "name=" + WWW.EscapeURL(name) + "&score=" + score + "&hash=" + hash;

It appears that the script is working to load the existing highscores from the database, so it's just something in Unity. Maybe I have to run a build of the game to get the php request working?

This is a type conversion error. It looks like you're building a string by adding together string literals and some variables. My best guess is that one of the variables is not a string type and cannot be converted automatically. Without seeing the whole file, I don't have enough context, but that doesn't really matter.

A simple way to debug that line is to split it up and see where the problem occurs:

var highscore_url = addScoreUrl + "name=";
var escapedUrl = WWW.EscapeURL(name);
highscore_url += escapedUrl;
highscore_url += "&score=" + score;
highscore_url += "&hash=" + hash;

Please run this code in its place and see what line the error occurs on. That will reveal which variable is the problem.