Well I'm trying to define 'NUMBAGS' as the number of bag slots, meaning if NUMBAGS = 1 then I only have the default bagpack, if NUMBAGS = 5 then I have the maximum amount of bags possible.
I've tried what you both said and I came up with this.
Code:
if GetContainerNumSlots(4) == 0 then
if GetContainerNumSlots(3) == 0 then
if GetContainerNumSlots(2) == 0 then
if GetContainerNumSlots(1) == 0 then
NUMBAGS = 1
else
NUMBAGS = 2
end
else
NUMBAGS = 3
end
else
NUMBAGS = 4
end
else
NUMBAGS = 5
end
Would this work out properly? It seems to work on one of my chars with the maximum amount of bags, as well as on a char with just the default bag.
Edit: It doesn't seem to work all the time. Strange. When I use it after login, it'll always return 1, when I use it after a reload it works fine. Maybe I need to delay it.
Edit 2: Added a login check now and it seems to work! .. most of the time.
Edit 3: It doesn't work when I log out, switch chars and log back in. It does work when I log out and log back in on the same char... This is so annoying.