SOLVED - Sending String through SendMessage

Hello Unity Community,

I spent hours googling to find a solution to a SendMessage problem. Please give me a hint what can be wrong with this:

Script 1, sending a String value:

//HERE pathTOFile is a String

Script 2, receiving the String value:

function MessageReceived(pathToFile:String){
			if (pathToFile.Length != 0) {
				var www = WWW("file:///" + pathToFile);

I continously get error message:
InvalidCastException: Cannot cast from source type to destination type.

What is wrong with it? Thank you for any help in advance.

Disregard my question please, making the variable public solved my problem.