UserFunction; SobGroup_Fresh - HWRM/KarosGraveyard Wiki

Original URL: https://github.com/HWRM/KarosGraveyard/wiki/UserFunction;-SobGroup_Fresh

SobGroup_Fresh(group_name)

By Novaras (Fear)

Description

Create group_name if it doesn't exist, and clears it regardless. Essentially, this function ensures you get an empty ('fresh') SobGroup.

Example

local my_fresh_group = SobGroup_Fresh("example-group"); -- string "example-group" is returned, and that SobGroup is empty.
-- example usage
SobGroup_SobGroupAdd(my_fresh_group, "some-other-group");
print(my_fresh_group); -- "example-group"

Definition

--- Creates a new sobgroup if one doesn't exist, then clears the group to ensure the group referenced by the return string is clear.
[email protected] group_name string
[email protected] string
function SobGroup_Fresh(group_name)
	SobGroup_CreateIfNotExist(name);
	SobGroup_Clear(name);
	return name;
end

Arguments

Param Type Description
group_name string The fresh SobGroup's name.

Returns

Type Description
string The name of the fresh SobGroup (as passed in).

Related Pages

Comments

Page Status

Updated Formatting? Initial
Updated for HWRM? Initial