Contents of array gets reset for some reason...
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Contents of array gets reset for some reason...
I'm trying to make a wire placing system, however when I "place" the second segment of the "wire", it suddenly deletes all the contents, and won't work anymore. When I view the length of the array in console, it suddenly goes to 0 for some reason, however the rendering "engine" still works. I've attached a .love file
, in the top left corner it says the mode (viewing mode by default), and you can press space to start placing the "wire".
Last edited by tommcjeff on Wed Dec 22, 2021 9:45 am, edited 2 times in total.
Re: Contents of array gets reset for some reason...
No love file attached.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: Contents of array gets reset for some reason...
Not a huge fan of playing debugger for other people, but this was glaringly obvious by looking at it, so I make an exception just for you:
You're passing currentnodeid to placewirenode in love.mousepressed, when you should be passing currentwireid instead.
You're passing currentnodeid to placewirenode in love.mousepressed, when you should be passing currentwireid instead.
Who is online
Users browsing this forum: Google [Bot] and 6 guests