Carpet

Carpet

2M Downloads

When using a colon to index an nbtcompound, if an array or list is returned, the result will be of type string rather than type nbt.

17183248569 opened this issue ยท 1 comments

commented

When using a colon to index an nbtcompound, if an array or list is returned, the result will be of type string rather than type nbt.

although a list could be of type nbt

/script run a=nbt('[1]');type(a)                    #nbt
/script run a=nbt('{a:[1]}');type(a:'a')            #string

by the way

/script run a=(nbt('{a:[1]}'):'a')                      #crash

will lead to crash.

is that a bug?
gnembon/scarpet#242

commented

Ok, the last one is a bug with compilation optimizer - fixed. The first one is an example of a caught 'todo', so I have done it.