Results 1 to 10 of 30

Thread: Yet another segfault (a.k.a. Darkhog is a total noob)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    You've got two 'isColliding' member functions as part of TGameObject but you've not overloaded them. This should give you an error in objfpc mode as far as I'm aware.

    You're range checking 'CurrentAnim' but you're not range checking 'GO.CurrentAnim' which you also use. Not saying that's the issue but you should be meticulous about such things.

    I'm getting the build environment setup so I can compile and debug this for you, will have you an answer asap

    EDIT : You're also calling 'inherited create' from your TAnimatedSprite constructor but the parent class doesn't have it's constructor marked as virtual.

    User137 is correct, you don't have 'Create' defined in the TAnimatedSprite interface but you do have it in the implementation section. As a result you're not calling that 'Create' in your Gameobject creation, instead it'll be calling whatever 'Create()' it next finds, probably TObject.

    I don't mean this is an offensive manner, but I've learned some things today, I'd of said this would never compile! but there lies the executable

    Edit : BAADF00D isn't just an amusing coincidence you know, look it up

    Edit : You had your compiler optimization on the highest setting, this will prevent you from debugging properly.
    Last edited by phibermon; 27-07-2013 at 08:14 PM.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •