Thunder2k4
Computer
- Jul 26, 2006
- 3
Hi, i'm in the process of coding a visual basic RPG game. I have recently added code to allow 1 square of the map to be turned into an object which teleports the user to another map. Although upon running the program it crashes at the stage where the program loads the item responsible for teleporting the user. The debug message is that of a 'Subscript Out Of Range' error, as shown here:
Upon debugging the program the error is displayed at the following line in the code:
Now the .Type variable is supposed to display 0 but for some reason it comes up with the Subscript error message, I have no idea why and I have used loads of different breakpoints to try and find the root of the problem, and have also tried removing sections of the code in order to make it work, as well as setting the variable to 0 manually. Can anyone help me to show me where i'm going wrong?
Thanks in advance,
Thunder
Upon debugging the program the error is displayed at the following line in the code:
Now the .Type variable is supposed to display 0 but for some reason it comes up with the Subscript error message, I have no idea why and I have used loads of different breakpoints to try and find the root of the problem, and have also tried removing sections of the code in order to make it work, as well as setting the variable to 0 manually. Can anyone help me to show me where i'm going wrong?
Thanks in advance,
Thunder