- Home /
error getting data from mySQL database
Hi,
I have a system that I bought off the assets store and everything is working fine, but now I am trying to modify and understand how it works.
I am trying to get how many logins the account has been used and then add one to it and update it (a simple thing for me to try to understand), but I am stuck at the start of it, I am just trying to call the information and log it for me to see but I am getting an error.
public void Connect(string _login, string password, string logins){
networkView.RPC("OnLogin",RPCMode.Server, _login,MD5Test.Md5Sum(password));
login = _login;
networkView.RPC ("logins", RPCMode.Server, logins);
Debug.Log (logins);
}
This is the call for it, just the "logins" one.
I have added it to the other files, but I get the following 2 errors and I cannot seem to get my head around what could be wrong.
Sending RPC 'OnLogin' failed because the number of supplied parameters doesn't match the RPC declaration. Expected 3 but got 2 parameters.
UnityEngine.NetworkView:RPC(String, RPCMode, Object[])
LoginManager:Connect(String, String, String) (at Assets/Scripts/LoginManager.cs:41)
Login:OnGUI() (at Assets/Scripts/Login.cs:28)
and RPC call failed because the function 'logins' does not exist in the any script attached to'System' UnityEngine.NetworkView:RPC(String, RPCMode, Object[]) LoginManager:Connect(String, String, String) (at Assets/Scripts/LoginManager.cs:43) Login:OnGUI() (at Assets/Scripts/Login.cs:28)
I have been poking around for a while and I just cannot get my head around it.
Can anyone shed any light on it please?
Thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220613125317im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Setup mySQL, insert value to mySQL, retrieve data from mySQL 0 Answers
unity3d connect to php or coldfusion for database information 2 Answers
MySql On Web ? 1 Answer
error connecting to my sql 2 Answers
have error on my database script 0 Answers