I've been banging my head against a problem when creating roles for a newly created group.
A player creates a group and in OnCreateGroup I call the following to set up additional roles within this newly created group:
var requeststudent = new CreateGroupRoleRequest { Group = result.Group, RoleId = "student", RoleName = "Student" }; PlayFabGroupsAPI.CreateRole(requeststudent, OnCreateRole, OnSharedError);
I get the group for the CreateGroupRoleRequest via the CreateGroupResponse (result.Group in this code snippet above).
I always get a Generic/unknown HTTP error, HTTP code 400, HTTP status BadRequest.
Am I doing something wrong when creating the role? My assumption is that the logged in player is admin of the newly created group, and thus, is allowed to set up new roles for this group. Is this something I should do via CloudScript instead? If so, what would a code example look like?
Thanks heaps!
-Sebastian