thank you for answering so quick. Broken_code, The error happends when I change the windows resolution(right button mouse on windows wallpaper...)
Another question is that I wanted to run the game in 320x240 fullscreen(native), no windowed. But if I use "set display" with 320x240,320x200, or any else lower than 640x480, then the screen turn black. I have a GTX 460 nvidia.
And finally other problem

the last version of darkbasic running on windows 7, the line give by darkbasic when an error occurs doesnt correspond to the line where the error is. Let me explain, If darkbasic says "Runtime Error 302 - Sprite does not exist at line 112", the line where the bug is, may be is 80, different than 112.
Thank you very much, the next week i will upload the game for you all