Hi guys, got another couple of questions:
i am trying to do a very simple user login system against stored server player prefs database.
i know this is not the best but for now is all i need.
first how can i fix this compiler error:
The !' operator cannot be applied to operand of type
string’
if (!PlayerPrefs.GetString(Username) )
[RPC]
public void LoginIRequest(string Username, string Password)
{
if (!PlayerPrefs.GetString(Username) )
{
Debug.Log("Login request Username does not exist in player prefs");
networkView.RPC("SendInvalidUserInfo",RPCMode.All,Username);
return;
}
second, will the return statement in bottom be enough or the right way to halt the process if no user found in player prefs?
thanks in advanced