"Sputnik" help  
Sputnik Help
NbtCompoundGetKeys(<nbtCompound>)

Description

Returns an array containing all the keys within an NBT compound.

Parameters

<nbtCompound> The NBT compound from which to retrieve the keys.

Return Value

Success: Returns an array of strings representing the keys within the NBT compound.
Failure: Returns null if the provided nbtCompound parameter is not a valid NBT compound.

Remarks

The NbtCompoundGetKeys function allows you to retrieve all the keys present within an NBT compound. It verifies that the nbtCompound parameter is a valid NBT compound and returns an array of strings representing the keys within the compound. Each key represents a unique identifier associated with a value within the NBT compound.

Related

Example

Example of usage:

my $nbt = NbtNew(@NbtCompound);
NbtCompoundSet($nbt, "Cat", "Meow");
NbtCompoundSet($nbt, "Dog", "Woof");
printr NbtCompoundGetKeys($nbt);

// PRINTS
// Array
// (
//     [0] => Cat
//     [1] => Dog
// )

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org