UserGroup CustomDat...
 
Notifications
Clear all

UserGroup CustomData??

7 Posts
2 Users
0 Likes
576 Views
 joki
(@joki)
Posts: 29
Eminent Member
Topic starter
 

Hello I'm wondering if user groups have custom data? 

 

Group script contains:

int _Reputation = 0;

public int Reputation
{
get { return _Reputation; }
set { _Reputation = value; customData["Reputation"] = _Reputation; }
}

 

public override void FromHashtable(Hashtable hash)
{
base.FromHashtable(hash);

 

if (customData.ContainsKey("Reputation"))
_Reputation = int.Parse(customData["Reputation"].ToString());
}

public Group_ ()
{
Reputation = 44;
}

 

 

another script trying to access the custom data doesnt add it... Am I doing it wrong? 

        Group_ group = new Group_();

        group.customData["Reputation"] = 33;

is this how to do it?

 
Posted : 25/01/2016 3:10 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

You're right, I found that CB_UserGroup::Save was not saving the value of CustomData on web server, please download the updated version 2.1.6 from Purchase History and you'll be able to store and load the custom data correctly on Group.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 25/01/2016 5:45 pm
 joki
(@joki)
Posts: 29
Eminent Member
Topic starter
 

I've sent the unity invoice number to you a couple hours ago. Thanks 🙂

 
Posted : 26/01/2016 4:31 am
 joki
(@joki)
Posts: 29
Eminent Member
Topic starter
 

Its still not updating the custom data.. 

 
Posted : 26/01/2016 6:08 am
 joki
(@joki)
Posts: 29
Eminent Member
Topic starter
 

Do i need to update usergroups? if so this is how I update:

 

group.Save((bool success, string error) => {
Debug.Log("Sucess: " + success);
});

 
Posted : 26/01/2016 6:28 am
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Yes, that's correct. I tried locally and it works.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 26/01/2016 11:47 am
 joki
(@joki)
Posts: 29
Eminent Member
Topic starter
 

works now.. Magic...

 
Posted : 26/01/2016 3:53 pm
Share: