Author Topic: Error message: Error playing map: Subscript out of range  (Read 3054 times)

Nakur

  • Visitor
  • *
  • Posts: 2
    • View Profile
Any idea what this error means?  The game will start up and run, but when I press control to try and swing a sword, the game crashes and that error comes up ("Error playing map: Subscript out of range").  I'll post the code if you need to see it to help... I'm sure the code is broken; I've made some massive changes over the original code, and deleted a lot of stuff that I thought wouldn't be needed in my script (or commented out stuff that I haven't implemented yet). 

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Error message: Error playing map: Subscript out of range
« Reply #1 on: 2006-10-30, 03:46:33 PM »
The code would certainly be much help.  However, since you haven't posted it yet, the first thing I can say is that you are trying to access an element in an array beyond the end of the array.  Possibly a sprite that doesn't exist yet or something of that manner.
Edward Dassmesser

Nakur

  • Visitor
  • *
  • Posts: 2
    • View Profile
Re: Error message: Error playing map: Subscript out of range
« Reply #2 on: 2006-11-06, 12:41:55 PM »
Just wanted to let you know that I did get this fixed.  As it turns out, the script I was using was checking Case 0, 2 or 1, 3 to tell if it was facing left or right and accelerating or drifting.  The sprite that I was using only had left / right cases, not left / right and accelerating / drifting cases, causing the game to crash.  Changed the sprites, and now it works great.

Thanks for your help, knowing that it was trying to check for something that didn't exist really helped with finding the problem.