Computer Science Canada Error: Cannot allocate item. Out of id numbers (max 1000) |
Author: | Kactus [ Sat Apr 15, 2006 12:31 am ] | ||
Post subject: | Error: Cannot allocate item. Out of id numbers (max 1000) | ||
So ive turned the moving dot tutorial into a simple program with a picture instead of a dot a BG and while I am playing it i get this Error: Cannot allocate item. Out of id numbers (max 1000) can anyone help? here is the code:
|
Author: | [Gandalf] [ Sat Apr 15, 2006 2:49 am ] |
Post subject: | |
That's because you're allocating a new picture at each iteration of your loop with Pic.FileNew(). What you should be doing is loading all your neccessary pictures at the start of the program (as you have done with Marioright.bmp) and then just changing which picture is being drawn inside the loop. What I suggest you do is have a variable which holds the last directional key pressed, and draw the picture based on that variable. |
Author: | Kactus [ Sat Apr 15, 2006 1:24 pm ] |
Post subject: | |
it worked! thank you |