Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Resetting A Array Length

Author
Message
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 25th Jan 2022 02:35
length=0 or length=-1 ????

Ok so I am trying my hardest to figure this out.

After the game the player goes back to the menu just for this demo .

Then if you play again a lot of things are not position correctly.

If I reset my arrays to 0 as MyArray.length=0 A lot is not correct.

but if I say MyArray.length=-1 then some stuff is correct but then it crashes a lot, not all the time but here and there.

What is wrong?


blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Jan 2022 03:14
MyArray.length=-1 is correct
I suspect that maybe some other index type variables need to be reset
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 25th Jan 2022 03:58
Quote: "I suspect that maybe some other index type variables need to be reset"


Ok thank you so much for the clarification.

Now I need to check everything.

Login to post a reply

Server time is: 2024-11-23 08:26:36
Your offset time is: 2024-11-23 08:26:36