var/i=1
var/a = list(0,0,0,0,0,0)
usr << output("<b>Item</b>","grid:1,[i]")
usr << output("<b>Status/Amount</b>","grid:2,[i]")
i++
for(var/obj/items/sword/S in usr.contents)
if(a[0] == 0)
usr <<output("<b>Swords</b>","grid:1,[i]")
i++
usr <<output(S,"grid:1,[i]")
i++
a[0] == 1
else if(a[0] == 1)
usr <<output(S,"grid:1,[i]")
i++
Problem description:
Basically everything under the if statement gets called but nothing under the else if gets called.
It won't work like that the for() will stop after it has return each item it won't continue to the elseif because there is nothing left for the for() to do after the first if().
If that makes sense? you'll need a while().