* * *

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

Handoko

  • Hero Member
  • *****
  • Posts: 1012
  • 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

  • Jr. Member
  • **
  • Posts: 85
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

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus