so part of my script is:
if(networkView.RPC("CheckPassword", RPCMode.Server, Username,Password)){
Application.LoadLevel(1);
} else {
ImWrong=true;
}
then my function looks like this:
@RPC
function CheckPassword(User: String, Pass:String):boolean{
if(Network.isServer){
LoginPass=PlayerPrefs.GetString(User,"Pass");
if(LoginPass==Pass)
return true;
else
return false;
}
}
but i get an error saying
Assets/LoginScript.js(30,19): BCE0026: 'void' cannot be used in a boolean context.
is there a way to set the value of CheckPassword to false before its called? or is there a different way to fix this problem