If I had a table with multiple inventory slots;
local inventory = {
[1] = {
['WoodLog'] = {
Name = 'Wood Log';
ItemDescription = 'Probably came from a tree';
ImageId = 0000000000;
Amount = 1;
StackLimit = 2;
}
};
[2] = {};
[3] = {};
[4] = {};
[5] = {};
[6] = {};
[7] = {};
[8] = {};
[9] = {};
}
Is there any way I can print Slot 1’s ImageId without using this;
print(inventory[1].WoodLog.ImageId)
I tried using the script below but it doesn’t seem to work
print(next(inventory[1]).ImageId)