"Sputnik" help  
Sputnik Help
NbtListExIsIdValid(<nbtListEx>, <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(@NbtListEx);
NbtListExAppendTag($nbt, Nbt("Hello"));

say $nbt;

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

// PRINTS
// {NBTTag;ListEx:1 entries}
// true
// false

 


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