struct_remove

This function removes a variable from a struct. You supply the struct ID to remove the variable from and the string name of the variable to be removed.

 

Syntax:

struct_remove(struct, name);

ArgumentTypeDescription
structStructThe struct reference to remove the variable from
nameStringThe name of the variable to remove (as a string)

 

Returns:

N/A

 

Example:

if (struct_exists(mystruct, "shields"))
{
    struct_remove(mystruct, "shields");
}

The above code will check to see if the given variable exists in the given struct and if it does then it is removed.