#for some reason it still does not work
1 messages · Page 1 of 1 (latest)
Same error?
Put Debug.Log($"items_list has {items_list.Count} items and item_number has {item_number.Count} items"); before the loop
well yes of course
on line 105 you add an item to items_list but not to item_number
yea
because if i do
it infinite loop
and unity DIES
I doubt that
well happend 3 times already :' (
or if it does, it's because of something else in later code because it manages to reach it
what do you mean
You now have this:
broken code
....
infinite loop
you don't get the infinite loop because the broken code stops the game before that
when you fix the broken code (i.e. add an item to item_number) the game continues and gets to the infinite loop
the broken code and the infinite loop are two separate things. Fixing the broken code doesn't cause the infinite loop.
i see...
so
it break because i don t add number
and when i do
it geas into the infinite void of death
goes*
Yes, somewhere else that you haven't shown
no screenshots please... #854851968446365696 for how to post code
oh k my bad
what do you think?
Have you actually tried it after changing the loop direction?
yup
now i tried removing the display part
and it works better
i have less errors
but i still get some
mostly the same
when i grab 2 item
its fine
when i grab 3 it dies
I mean did you try it with the reverse loop and item_number.Add(1) inside the loop
because of course it would get into an infinite loop in the old loop, because you keep adding more stuff to the list so the loop never ends
oh yeah but since we inverted it ... i see
k now only one glicht left...
but this one is on me so