Author Topic: attempted to access ... on inactive sprite  (Read 11592 times)

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: attempted to access ... on inactive sprite
« Reply #15 on: 2008-08-28, 08:27:40 PM »
At some point, it must've.  I don't remember what was there before, though.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: attempted to access ... on inactive sprite
« Reply #16 on: 2008-08-29, 01:35:09 AM »
i'm glad the lost part of my message wasn't lost forever. phew.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: attempted to access ... on inactive sprite
« Reply #17 on: 2008-09-04, 06:54:02 AM »
strange. a new "attempted access"-message at another project. i have some moving sprites, after going too far outside the map they shall be deleted (insert evil laugh)
i made this little code at the bottom of the sprite rules:
Code: [Select]
// if out of map
         if ((((x) <= (-200))
                  || ((x) > (6500))))
         {
            // deactivate
            this.Deactivate();
         }
i believe at my computer at home this worked, but now on my friends computer not?! i've uploaded the "birdies"-file to the support site, bluemonk. hopefully you can find something.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: attempted to access ... on inactive sprite
« Reply #18 on: 2008-09-04, 05:14:00 PM »
This is a problem that was pointed out to me by Durnurd and has been fixed in 2.1, but not released yet.  The problem is in TextCollisionRect in SpriteBase.cs.  To fix it you just have to change one line:
Code: [Select]
if (TargetSprite == this)
should be
Code: [Select]
if ((TargetSprite == this) || (!TargetSprite.isActive))

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: attempted to access ... on inactive sprite
« Reply #19 on: 2008-09-05, 03:05:14 AM »
wheeeee! thanks!