If someone wanted to make a grid that creates a new row, every 4 items in it four being the cap of columns how would they go about it?
It keeps expanding columns to like 8 stretching the grid and then making a new row
![]() Sep 12 2020, 8:29 pm
|
|
You'd need to keep track of how many items you outputted and move to the next row.
|
I'm learning a bit but I'm lost with ( --stuff ) and items[stuff]
mob for some reason its acting buggy |
Kayla May wrote:
I'm learning a bit but I'm lost with ( --stuff ) and items[stuff] --stuff is just subtracting 1 from stuff each time. Look up the -- operator when you forget the difference between --x and x-- (I can never keep it straight in my head for some reason). items[stuff] would just be accessing a list called items using a numerical index. if( !X.passive )
On this line, the ! is acting on X, not X.passive. You want this instead: if( !(X.passive) )
|
mob I suck... It keeps seeing out of index or something like that! |
Hey now, nothing wrong with being a noob, we all started there.
Could be a copying mistake, but the last line is supposed to be indented one more time so that it's inside the while() loop. Also fix this line: if( !X.passive ) |