Qbasicnews.com
Problems with ending program - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html)
+--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html)
+--- Thread: Problems with ending program (/thread-8045.html)

Pages: 1 2


Problems with ending program - Pyrokid - 09-08-2005

For some reason when i run this code and then press escape at the end it freezes and i have to go into task manager to quit the prog.

Code:
xlmt=100
ylmt=63
dim pic(xlmt*ylmt)
dim prev(xlmt*ylmt)

screen 18,32
paint (0,0),&HFF00FF 'mask color for direct color mode
bload "c:\freebasic\test2.bmp"
get (1,1)-(xlmt,ylmt),pic
cls
bload "C:\freebasic\test.bmp"
xlmt=int(xlmt)/2:ylmt=int(ylmt/2)
x=xlmt:y=ylmt
get (x-xlmt,y-ylmt)-(x+xlmt,y+ylmt),prev
do
    a$=inkey$
    if x-xlmt<=0 then xchg=1
    if x+xlmt>=640 then xchg=-1
    if y-ylmt<=0 then ychg=1
    if y+ylmt>=480 then ychg=-1
    put (x-xlmt,y-ylmt),prev,trans
    x=x+xchg
    y=y+ychg
    get (x-xlmt,y-ylmt)-(x+xlmt,y+ylmt),prev
    put(x-xlmt,y-ylmt),pic,trans
    sleep 10
loop until a$=chr$(27)



Problems with ending program - mjs - 09-08-2005

FBC version? Platform?

BTW: Can you create an example that shows the same error but doesn't BLOAD images? Thanks in advance.

Regards,
Mark


Problems with ending program - Pyrokid - 09-08-2005

FBide ver 0.4
FB ver .13

The pictures dont really make a diference you can get what it looks like just by lookin at the code


Problems with ending program - mjs - 09-09-2005

Have you tried 0.14? There were many bugs fixed - especially the application entry/exit code generation.

Regards,
Mark


Problems with ending program - Pyrokid - 09-09-2005

I got fbide so can i just replace the compiler and leave everything else


Problems with ending program - dumbledore - 09-09-2005

you should uninstall fbide+fbc, then install the fbide 0.4.2 + fbc 0.14 package on http://fbide.sourceforge.net


Problems with ending program - Pyrokid - 09-09-2005

Hmm i did that and after 3 installs i finaly got the compiler to run but it still freezes at the end :evil:


Problems with ending program - Pyrokid - 09-09-2005

Bah! :x

The arrays were not big enuf. Can anyone give me some kind of forumla or system to figure how much i need for it


Problems with ending program - red_Marvin - 09-09-2005

Quote:For color depths 24 and 32:
size = 4 + (w * h * 4)
Is this what you mean?
I just skimmed through the text, so I might answer a never asked question.


Problems with ending program - Pyrokid - 09-09-2005

yes Thank you Tongue

Btw whats the thinking behind that?