Loading player data using data persistence

Hi, I am learning to how to save player data using data persistence and I have encountered an error which has me confused. In the tutorial I am watch it is in C# however I am using UnityScript. The following screenshot is the tutorial and the code snippet is what I have wrote.
86888-screen-shot-2017-01-28-at-175124.png

if(File.Exists(Application.persistentDataPath + "/gameInfo.dat")){
		var binForm : BinaryFormatter = new BinaryFormatter();
		var file : FileStream = File.Open(Application.persistentDataPath + "/gameInfo.dat", FileMode.Open);
		var data : playerData = (playerData)binForm.Deserialize(file);
		file.Close();

I thought I had translated it correctly however line 4 of my code snippet where I am deserialising the file, I get an error which is expecting a semicolon at the end of that line. Any idea why this might be happening? thanks

The syntax problem is with typecasting. Instead of (playerData)binForm.Deserialize(file), type binForm.Deserialize(file) as playerData.