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.

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);

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.