Author |
Message |
KukuriChan
|
Posted: Mon Apr 12, 2004 6:33 pm Post subject: Array Subscript Out of Range Error! |
|
|
I'm done making my game for comsci but somehow there's always an error that pops up that says that my array is out of range. I don't know why that happens. Can anybody help me?
Description: |
Go into taketurns.t to play. ^^ There's the main error. |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
Flight.zip |
Filesize: |
263.36 KB |
Downloaded: |
216 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Paul
![](http://i12.photobucket.com/albums/a207/paulbian/DDRDuck.png)
|
Posted: Mon Apr 12, 2004 7:50 pm Post subject: (No subject) |
|
|
Wow, its amazing. I just love the music.
I didn't get the error you said? can u explain more on how u got the error?
I played with 2 players, 3 planes each.
But this is really good, the music is great and you got the pieces to move in the right path lol
One problem though, it runs really laggy on my computer, do you have it draw the board over and over again? cause mine flashes.
Good Job!
|
|
|
|
|
![](images/spacer.gif) |
gamer
|
Posted: Mon Apr 12, 2004 8:58 pm Post subject: (No subject) |
|
|
hey i can tell its chinese music..haha
anyway, yea i tried the program n lot of flashin going on
|
|
|
|
|
![](images/spacer.gif) |
KukuriChan
|
Posted: Mon Apr 12, 2004 9:27 pm Post subject: (No subject) |
|
|
Wow, thanks for the compliments. Really, you guys didn't get the error? Hm... that's weird. Actually, the error doesn't pop up that often. See, every time I try moving a second plane out or keep moving the same pawn, the error "Array subscript out of range" error always occur. I don't know how I can fix it.
(I don't know how to keep it from flashing since I have to repeat the procedure over and over again. I was thinking of using view.update though but I don't really know where to put it so I made a loop that redraws the board every time. ^^;
|
|
|
|
|
![](images/spacer.gif) |
zeldamaster1230
|
Posted: Tue Apr 13, 2004 8:29 am Post subject: (No subject) |
|
|
for the View.Update, simply do this:
setscreen ("offscreenonly")
loop
cls
%coding goes here
View.Update
end loop
that's pretty much it
three more lines
hope this helps!
|
|
|
|
|
![](images/spacer.gif) |
recneps
![](http://www.fcpocanada.com/canada1.gif)
|
Posted: Tue Apr 13, 2004 2:47 pm Post subject: (No subject) |
|
|
array subscript means you are making a value larger than the array is set to hold... so just increase array size, or use flexible array and the "new" command to change the array size
(eg you're trying to fill the 26th spot when there are only 25 spots in the array)
|
|
|
|
|
![](images/spacer.gif) |
KukuriChan
|
Posted: Tue Apr 13, 2004 4:19 pm Post subject: (No subject) |
|
|
Zelda Master: thanks. IT worked. There's no more flashing anymore. ^^
Recneps : Yeah I increased the array size but there's still an error message going on.
|
|
|
|
|
![](images/spacer.gif) |
recneps
![](http://www.fcpocanada.com/canada1.gif)
|
Posted: Wed Apr 14, 2004 4:09 pm Post subject: (No subject) |
|
|
try the debugger, run through it line by line, and try to get the error... maybe you can see whats goin on
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
|