Re: hateful rant on arrays

2018-12-28 Thread AudioGames . net Forum — Developers room : rory-games via Audiogames-reflector
Re: hateful rant on arrays well that explains why when using my practice game when selecting stuff from the weapon aray you always have to put the weapon number +1. URL: http://forum.audiogames.net/post/401403/#p401403 -- Audiogames-reflector mailing list Audiogames-reflector

Re: hateful rant on arrays

2018-12-27 Thread AudioGames . net Forum — Developers room : Liam via Audiogames-reflector
Re: hateful rant on arrays might be base 1 now that I think of it. I'd have to go check old code URL: http://forum.audiogames.net/post/401226/#p401226 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman

Re: hateful rant on arrays

2018-12-27 Thread AudioGames . net Forum — Developers room : Aprone via Audiogames-reflector
Re: hateful rant on arrays Nope.  I mean you can always choose to start them at 1 by just ignoring the zero spot (actually a great idea in some situations), but they do start at zero just like most other languages.  Actually I think there is a command to force them to start at values other

Re: hateful rant on arrays

2018-12-27 Thread AudioGames . net Forum — Developers room : Liam via Audiogames-reflector
Re: hateful rant on arrays they are? I remember always starting at 1. URL: http://forum.audiogames.net/post/401218/#p401218 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames

Re: hateful rant on arrays

2018-12-27 Thread AudioGames . net Forum — Developers room : Aprone via Audiogames-reflector
Re: hateful rant on arrays Arrays in VB6 are base 0.  URL: http://forum.audiogames.net/post/401215/#p401215 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: hateful rant on arrays

2018-12-27 Thread AudioGames . net Forum — Developers room : Liam via Audiogames-reflector
Re: hateful rant on arrays That's the tricky thing about arrays. Getting a length will give you the length of the array, but since the array is base 0, you always have to subtract one from the total length so you don't go over. I was spoiled with vb6 since it is always base 1. I can't

Re: hateful rant on arrays

2018-12-26 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: hateful rant on arrays No problem. Once you use them enough, you get used to their querk. C++ (and other languages) makes arrays much easier to work with with classes like std::vector (or Python's lists), providing you safety from going out of bounds and causing the classic "m

Re: hateful rant on arrays

2018-12-25 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: hateful rant on arrays that made it work. thank you Ethan. I had no idea an array would be this difficult. But I am much more comfortable using them thanks to the help you have provided. Again thank you. URL: http://forum.audiogames.net/post/400824/#p400824 -- Audiogames

Re: hateful rant on arrays

2018-12-25 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: hateful rant on arrays Deduct the index outside the function call to speak:index--; // or --index;.speak(messages[index]); URL: http://forum.audiogames.net/post/400818/#p400818 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin

Re: hateful rant on arrays

2018-12-25 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: hateful rant on arrays Thank you for the help. It did fix my out of bounds errors. However, I am having the following issue.speak(messages[index-=1}); If index = 5, than it will always speak the message number 4. Say I press left arrow, and I've already heard message 4, it will keep

Re: hateful rant on arrays

2018-12-25 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: hateful rant on arrays @6, no. Find another use of the counter. Something like:int index=0;...// in loop...// C++ example, similar enough to BGTif (index-1<0) {// re-speak the message just spoken, we're at the edge of the buffer} else if (index+1>array.size()-1) {// out of bounds

Re: hateful rant on arrays

2018-12-25 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: hateful rant on arrays @post4: So like this?Int index=0; then after a new message index+=1; then counter=index. So when I press left arrow: index-=1; speak(messages[counter]); URL: http://forum.audiogames.net/post/400752/#p400752 -- Audiogames-reflector mailing list Audiogames

Re: hateful rant on arrays

2018-12-24 Thread AudioGames . net Forum — Developers room : nyanchan via Audiogames-reflector
Re: hateful rant on arrays Assuming you're only inclementing / declementing by 1,if(--counter==-1) counter=0;orif(++counter==menuArray.length) counter=menuArray.length-1; URL: http://forum.audiogames.net/post/400656/#p400656 -- Audiogames-reflector mailing list Audiogames-reflector

Re: hateful rant on arrays

2018-12-24 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: hateful rant on arrays Keep an external index, and increment that, and access the buffer using that index. Then do a check to ensure your not going out of bounds. URL: http://forum.audiogames.net/post/400655/#p400655 -- Audiogames-reflector mailing list Audiogames-reflector

Re: hateful rant on arrays

2018-12-24 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: hateful rant on arrays Here’s what I am attempting to do. A message history buffer. Left arrow says previous message and right arrow says the next message. I have the loop for it, but I don’t know what to write for previous and next. I have tried counter plus 1 and minus 1, doesn’t

Re: hateful rant on arrays

2018-12-24 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: hateful rant on arrays OK... first. Remind you of what arrays are:* Arrays are collections of items with a specified type.* Arrays are zero-indexed.* The last element of an array is the size of the array minus one. URL: http://forum.audiogames.net/post/400648/#p400648