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

Description

Returns the number of keys within an NBT compound.

Parameters

<nbtCompound> The NBT compound for which to count the keys.

Return Value

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

Remarks

The NbtCompoundCount function allows you to determine the number of keys present within an NBT compound. It verifies that the nbtCompound parameter is a valid NBT compound and returns the count of 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);
say NbtCompoundCount($nbt);
NbtCompoundSet($nbt, "Cat", "Meow");
NbtCompoundSet($nbt, "Dog", "Woof");
say NbtCompoundCount($nbt);

// PRINTS
// 0
// Meow
// Woof
// 2

 


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