Recent

Author Topic: [SOLVED] Destroy and Halt are failing  (Read 6444 times)

Handoko

  • Hero Member
  • *****
  • Posts: 5149
  • My goal: build my own game engine using Lazarus
Re: Destroy and Halt are failing
« Reply #15 on: April 19, 2017, 05:21:26 pm »
@yurkad

I guess what Thaddy said is:

you should use 0 as the starting point of index.

When I was a novice programmer, I like to use 1 as the base of index (array, collection, or ...). But I noticed others usually use 0. So I often needed to use my count-1 or index-1 to prevent out of range error when calling or using their functions.

So, I think Thaddy sensed your mistake, which I also think so - the cause of your error is you didn't use the index value properly.
« Last Edit: April 19, 2017, 05:26:27 pm by Handoko »

yurkad

  • Full Member
  • ***
  • Posts: 173
  • development
Re: Destroy and Halt are failing
« Reply #16 on: April 19, 2017, 10:09:00 pm »
Thank you by explanation, Handoko.

A times I am pretty stupid  :D

 

TinyPortal © 2005-2018