"Sputnik" help  
Sputnik Help
NbtListIsIdValid(<nbtList>, <index>)

Description

Checks if a given index is valid within an NBT list, indicating if an element exists at that location.

Parameters

<nbtList> The NBT list to be checked for a valid index.
<index> The index to be checked for validity within the list.

Return Value

Success: Returns true if the index is valid and an element exists at that location in the NBT list.
Failure: Returns false if the provided nbtList parameter is not a valid NBT list or if the index is out of range.

Remarks

The NbtListIsIdValid function allows you to check if a given index is valid within an NBT list. It verifies if an element exists at the specified index within the list. If the provided nbtList parameter is not a valid NBT list or if the index is out of range, the function returns false.

Related

Example

Example of usage:

my $nbt = NbtNew(@NbtList);
NbtListAppendTag($nbt, Nbt("Hello"));

say $nbt;

say NbtListIsIdValid($nbt, 0);
say NbtListIsIdValid($nbt, 1);

// PRINTS
// {NBTTag;List:1 entries of type String}
// true
// false

 


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