Page 1 of 1
MFPS Friend List + database
Posted: Mon Apr 12, 2021 9:40 am
by Moor
Hallo
Game v1.8
Does anyone have this problem?
I tried to change the format of the language
There was a similar problem with "meta"
I cannot check the Lovatto project, I get an error like this:
My project: How can i fix it or how can i change format?
If you add friend
Your data:
logout then login:
Thank you
Re: MFPS Friend List + database
Posted: Mon Apr 12, 2021 2:30 pm
by Lovatto
Which version of ULogin Pro are you using?
Re: MFPS Friend List + database
Posted: Mon Apr 12, 2021 3:16 pm
by Moor
Lovatto wrote: ↑Mon Apr 12, 2021 2:30 pm
Which version of ULogin Pro are you using?
Hi.
Re: MFPS Friend List + database
Posted: Mon Apr 12, 2021 5:47 pm
by Lovatto
The error line from your screenshot doesn't match with the original script,
make sure the function 'CheckIfUserExist(...)' in bl_Database.cs is the same as this:
Code: Select all
public static void CheckIfUserExist(MonoBehaviour reference, string where, string index, Action<bool> callback)
{
bl_ULoginWebRequest webRequest = new bl_ULoginWebRequest(reference);
var wf = bl_DataBaseUtils.CreateWWWForm(FormHashParm.Name, true);
wf.AddSecureField("typ", 4);
wf.AddSecureField("key", where);
wf.AddSecureField("values", index);
webRequest.POST(bl_LoginProDataBase.Instance.GetUrl(bl_LoginProDataBase.URLType.DataBase), wf, (result) =>
{
if (result.isError)
{
if (result.HTTPCode == 409)//response means user doesn't exists
{
callback?.Invoke(false);
return;
}
else
{
result.PrintError();
return;
}
}
callback?.Invoke(result.resultState == ULoginResult.Status.Success);
});
}
Also, have you upgraded from an older version?
if you have, make sure you also update the Php scripts in your server.
Re: MFPS Friend List + database
Posted: Mon Apr 12, 2021 6:27 pm
by Moor
Lovatto wrote: ↑Mon Apr 12, 2021 5:47 pm
The error line from your screenshot doesn't match with the original script,
make sure the function 'CheckIfUserExist(...)' in bl_Database.cs is the same as this:
Code: Select all
public static void CheckIfUserExist(MonoBehaviour reference, string where, string index, Action<bool> callback)
{
bl_ULoginWebRequest webRequest = new bl_ULoginWebRequest(reference);
var wf = bl_DataBaseUtils.CreateWWWForm(FormHashParm.Name, true);
wf.AddSecureField("typ", 4);
wf.AddSecureField("key", where);
wf.AddSecureField("values", index);
webRequest.POST(bl_LoginProDataBase.Instance.GetUrl(bl_LoginProDataBase.URLType.DataBase), wf, (result) =>
{
if (result.isError)
{
if (result.HTTPCode == 409)//response means user doesn't exists
{
callback?.Invoke(false);
return;
}
else
{
result.PrintError();
return;
}
}
callback?.Invoke(result.resultState == ULoginResult.Status.Success);
});
}
Also, have you upgraded from an older version?
if you have, make sure you also update the Php scripts in your server.
This error has been fixed.
And I was able to add a friend (In your project)
But after the relog
In your project and my project, it turns out a problem but not an error
Re: MFPS Friend List + database
Posted: Mon Apr 12, 2021 6:34 pm
by Moor
If you manage to solve this problem
Please tell me how you fixed it. If a little problem
Re: MFPS Friend List + database 20/04/2021
Posted: Mon Apr 19, 2021 7:55 pm
by Moor
I have updated ULogin Pro but still the same.
Then: Log Out = LogIn
Then: Remove all friends = intive 1 player = Log Out = LogIn
I did not change the assembly. Check it self please.
Re: MFPS Friend List + database
Posted: Wed Apr 28, 2021 9:28 pm
by Lovatto
Sorry for the late reply,
to fix this issue do the following:
in bl_ULoginMFPS.cs replace the function SaveFriendList(...) with:
Code: Select all
public static void SaveFriendList(string friends, Action callback = null)
{
bl_DataBase.Instance.SaveValue("friends", friends, callback, true);
}
This will fix the issue for friends that you add from now on, the friends added before you applied the fix will be still corrupted so you have to manually delete them.
Re: MFPS Friend List + database
Posted: Fri Apr 30, 2021 2:47 pm
by Moor
Thank you so much for your help and information