"Sputnik" help  
Sputnik Help
NbtGetId(<nbt>)

Description

Returns the type ID of an NBT (Named Binary Tag) object.

Parameters

<nbt> The NBT object.

Return Value

Success: Returns the type ID of the NBT object.
Failure: Returns @NbtError (255) if the NBT object is invalid or if an error occurs.

Remarks

The NbtGetId function retrieves the type ID of the given NBT object. The type ID corresponds to the specific NBT type, such as @NbtByte, @NbtShort, @NbtInt, @NbtString, etc. The function returns the type ID as a numeric value or one of the NBT constants.

Related

Example

Example of usage:

my $nbt = Nbt((Int32)42, "myTag");
say NbtGetId($nbt) == @NbtInt;
// PRINTS
// true

 


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