Reference des fonctions
GameMaker Studio · GML · Groups & clans
gmda_updateGroup
Edits the caller's group settings (leader/officer only).
Asynchronous (result via event)
Signature
gmda_updateGroup(fields_struct) -> realWhat it does
POSTs /groups/update, then queues group_updated { success, response }. On success the updated group projection is at e.response.group. On failure success is false and e.error carries the raw server message, e.g. "You are not in a group", "You cannot edit this group", or "Group not found".
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| fields_struct | struct | required | Fields to change: name (<=50), description (<=500), join_policy ("open"|"request"|"invite_only"|"closed"), max_members (1-1000). The tag is NOT editable. Only the keys you include are changed. |
How to call it
Call it, then read group_updated from gmda_pollEvent(). The caller needs edit permission (typically leader or officer). Build the struct with only the fields you want to change.
Result event: group_updated { success, response }
Example
gmda_updateGroup({ description: "New recruits welcome", join_policy: "open" });
var e = gmda_pollEvent();
while (!is_undefined(e)) {
if (e.event == "group_updated" && !e.success) {
show_debug_message("Failed: " + e.error);
}
e = gmda_pollEvent();
}Use cases
- Let a leader rewrite the clan description.
- Switch a group between open and request-to-join.