Posts: 319
Threads: 68
Joined: Mar 2005
I was trying to compile one of my programs that uses a library for the mouse and it gets to the part where it compiles the librarys and for some reason it thinks i use qb.lib but it doesnt use that it uses qb.qlb so i type that in were it askes me for a dif file spec and i get a fatal error saying that qb.qlb is'nt a library
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
you might have to type the full path something like c:\qb\qb.qlb, or wherever it is
Posts: 319
Threads: 68
Joined: Mar 2005
yeah tried that
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Posts: 3,279
Threads: 170
Joined: Nov 2003
Try entering qb.lib instead of qb.qlb. QLB libraries are only for use in the IDE. The LIB libraries are used when compiling.
I'd knock on wood, but my desk is particle board.
oh yeah, thats totally it :P *smacks forehead*
Posts: 319
Threads: 68
Joined: Mar 2005
lol the problem in the first place is that i dont have qb.lib i have qb.qlb
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Posts: 3,522
Threads: 189
Joined: Dec 2003
You cant compile a QB IDE source that uses QB.QLB unless you have the QB.LIB file.
QLB = IDE, interpreted
LIB = Compiled
Posts: 319
Threads: 68
Joined: Mar 2005
ok now i got another problem when i compile i get 2345 errors or some number around there heres the code if you wouldnt mind explaining to me whats goin wrong
Code: '$INCLUDE: 'qb.bi'
DECLARE SUB zoomchange ()
DECLARE SUB mouse ()
DECLARE SUB load (filename$)
DECLARE SUB savepic ()
DECLARE SUB save ()
up$ = CHR$(0) + CHR$(72): down$ = CHR$(0) + CHR$(80): lft$ = CHR$(0) + CHR$(75)
rght$ = CHR$(0) + CHR$(77)
ON ERROR GOTO errorhandler
DIM SHARED in AS RegTypeX, outr AS RegTypeX
DIM SHARED prev(1000)
DIM SHARED x
DIM SHARED y
DIM SHARED lx
DIM SHARED ly
DIM SHARED sx
DIM SHARED sy
DIM SHARED file
DIM SHARED zoom
DIM SHARED filename$
DIM SHARED errorcode
DIM SHARED col(140, 107)
DIM SHARED mspeed
mspeed = 5
x = 1: y = 1
sx = 1: sy = 1
1
SCREEN 13
in.ax = 0: mouse
CLS
COLOR 10: PRINT "Picture Maker"
COLOR 11: PRINT "1) Get started"
COLOR 12: PRINT "2) Controls"
COLOR 13: PRINT "3) Load"
COLOR 14: PRINT "4) Quit"
COLOR 7
a$ = "0"
DO UNTIL VAL(a$) <= 4 AND VAL(a$) >= 1: a$ = INKEY$: LOOP
SELECT CASE VAL(a$)
CASE 1
GOTO prompt
CASE 2
GOTO controls
CASE 3
GOTO loadpic
CASE 4
END
END SELECT
controls:
PRINT "Controls:"
PRINT "Arrow keys to move cursor"
PRINT "Press the numbers to change colors"
PRINT "Press S to go to the save prompt"
PRINT "When in save press S at any time to exit to edit mode"
PRINT "When in save select the part in the picture that you want to save"
PRINT "then press tab to save type a file name to save it"
SLEEP
GOTO 1
prompt:
INPUT "Select the zoom of the picture (0-10) ", zoom
CLS
GOTO start
loadpic:
INPUT "What is the name of the file? ", filename$
INPUT "What zoom would you like? ", zoom
IF zoom = 0 THEN zoom = 1
filename$ = filename$ + ".pic"
load filename$
zoom = zoom - 1
IF errorcode = 64 OR errorcode = 53 THEN GOTO 1
start:
GET (x, y)-(x + zoom, y + zoom), prev
color1 = 0
in.ax = 3: mouse
oldx = outr.cx
oldy = outr.dx
' set mouse pos at 1,1
in.ax = 4
in.cx = 1
in.dx = 1: mouse
'in.ax = 1: mouse
DO
'if the mouse is all the way to the right bring it back to 1
in.ax = 3: mouse
IF outr.cx >= 639 THEN
in.ax = 4: in.cx = 1: mouse
oldx = in.cx
END IF
'if the mouse is at the bottom bring it to the top
IF outr.dx >= 199 THEN
in.ax = 4: in.dx = 1: mouse
oldy = in.dx
END IF
'if its <= 1 then move it back to the right
IF outr.cx <= 1 THEN
in.ax = 4: in.cx = 600: mouse
oldx = in.cx
END IF
IF outr.dx <= 5 THEN
in.ax = 4: in.dx = 170: mouse
oldy = in.dx
END IF
a$ = INKEY$
IF a$ = CHR$(27) THEN END
IF color1 = 0 THEN color1 = 11
LINE (x, y)-(x + zoom, y + zoom), color1, BF
SELECT CASE UCASE$(a$)
CASE "+"
IF zoom < 10 THEN
CLS
zoom = zoom + 2
zoomchange
zoom = zoom - 1
GOTO start
END IF
CASE "-"
IF zoom > 1 THEN
CLS
zoom = zoom - 1
zoomchange
zoom = zoom - 1
GOTO start
END IF
CASE "S"
save
'checks for up down left or right
CASE up$
IF y > 1 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
y = y - (zoom + 1)
sy = sy - 1
GET (x, y)-(x + zoom, y + zoom), prev
END IF
CASE down$
IF y <= 144 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
sy = sy + 1
y = y + (zoom + 1)
GET (x, y)-(x + zoom, y + zoom), prev
END IF
CASE rght$
IF x <= 280 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
sx = sx + 1
x = x + (zoom + 1)
GET (x, y)-(x + zoom, y + zoom), prev
END IF
CASE lft$
IF x > 1 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
x = x - (zoom + 1)
sx = sx - 1
GET (x, y)-(x + zoom, y + zoom), prev
END IF
'clears blocks
CASE "C"
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
col(sx, sy) = 0
GET (x, y)-(x + zoom, y + zoom), prev
END SELECT
in.ax = 3: mouse
IF outr.bx = 1 THEN
a$ = "1"
END IF
IF outr.bx = 2 THEN
a$ = "4"
END IF
'changes colors of blocks
IF VAL(a$) <= 9 AND VAL(a$) >= 1 THEN
b = VAL(a$)
color1 = b
col(sx, sy) = b
LINE (x, y)-(x + zoom, y + zoom), b, BF
GET (x, y)-(x + zoom, y + zoom), prev
END IF
in.ax = 3: mouse
IF outr.cx > oldx + mspeed THEN
IF x <= 280 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
sx = sx + 1
x = x + (zoom + 1)
GET (x, y)-(x + zoom, y + zoom), prev
oldx = outr.cx
END IF
END IF
IF outr.cx < oldx - mspeed THEN
IF x > 1 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
x = x - (zoom + 1)
sx = sx - 1
GET (x, y)-(x + zoom, y + zoom), prev
oldx = outr.cx
END IF
END IF
IF outr.dx > oldy + mspeed THEN
IF y <= 144 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
sy = sy + 1
y = y + (zoom + 1)
GET (x, y)-(x + zoom, y + zoom), prev
oldy = outr.dx
END IF
END IF
IF outr.dx < oldy - mspeed THEN
IF y > 1 THEN
color1 = 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (x, y), prev
y = y - (zoom + 1)
sy = sy - 1
GET (x, y)-(x + zoom, y + zoom), prev
oldy = outr.dx
END IF
END IF
LOOP
END
errorhandler:
errorcode = ERR
RESUME NEXT
SUB load (filename$)
CLS
errorcode = 0
OPEN filename$ FOR INPUT AS #1
IF errorcode = 64 OR errorcode = 53 THEN
PRINT "Bad file name"
SLEEP
EXIT SUB
END IF
INPUT #1, lx, ly
FOR sy = 1 TO ly
FOR sx = 1 TO lx
INPUT #1, col(sx, sy)
NEXT
NEXT
CLOSE #1
ay = 0
FOR y = 1 TO ly * zoom STEP zoom
ay = ay + 1
bx = 0
FOR x = 1 TO lx * zoom STEP zoom
bx = bx + 1
LINE (x, y)-(x + zoom, y + zoom), col(bx, ay), BF
NEXT
NEXT
x = 1
y = 1
sx = 1
sy = 1
END SUB
SUB mouse
CALL INTERRUPTX(&H33, in, outr)
END SUB
SUB save
up$ = CHR$(0) + CHR$(72): down$ = CHR$(0) + CHR$(80): lft$ = CHR$(0) + CHR$(75)
rght$ = CHR$(0) + CHR$(77)
DIM prevy(16383)
DIM prevx(16383)
GET (0, y)-(x, y), prevy
GET (x, 0)-(x, y), prevx
DO
a$ = INKEY$
color2 = 11
LINE (x, y)-(x + zoom, y + zoom), color2, BF
'draws a straight line from the wall to the block so the user
'knows what he is saving
LINE (0, y)-(x, y), 9
LINE (x, 0)-(x, y), 9
SELECT CASE UCASE$(a$)
'gets rid of lines and exits sub
CASE "S"
LINE (0, y)-(x, y), 0
PUT (0, y), prevy
LINE (x, 0)-(x, y), 0
PUT (x, 0), prevx
EXIT SUB
'checks witch direction then clears the line
'puts back what was there and moves the cursor
CASE up$
IF y >= 1 THEN
LINE (0, y)-(x, y), 0
LINE (x, 0)-(x, y), 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (0, y), prevy
PUT (x, 0), prevx
color1 = 0
PUT (x, y), prev
sy = sy - 1
y = y - (zoom + 1)
GET (0, y)-(x, y), prevy
GET (x, 0)-(x, y), prevx
GET (x, y)-(x + zoom, y + zoom), prev
END IF
CASE down$
IF y <= 144 THEN
LINE (0, y)-(x, y), 0
LINE (x, 0)-(x, y), 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (0, y), prevy
PUT (x, 0), prevx
color1 = 0
PUT (x, y), prev
sy = sy + 1
y = y + (zoom + 1)
GET (0, y)-(x, y), prevy
GET (x, 0)-(x, y), prevx
GET (x, y)-(x + zoom, y + zoom), prev
END IF
CASE rght$
IF x <= 180 THEN
LINE (0, y)-(x, y), 0
LINE (x, 0)-(x, y), 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (0, y), prevy
PUT (x, 0), prevx
color1 = 0
PUT (x, y), prev
sx = sx + 1
x = x + (zoom + 1)
GET (0, y)-(x, y), prevy
GET (x, 0)-(x, y), prevx
GET (x, y)-(x + zoom, y + zoom), prev
END IF
CASE lft$
IF x >= 1 THEN
LINE (0, y)-(x, y), 0
LINE (x, 0)-(x, y), 0
LINE (x, y)-(x + zoom, y + zoom), 0, BF
PUT (0, y), prevy
PUT (x, 0), prevx
color1 = 0
PUT (x, y), prev
sx = sx - 1
x = x - (zoom + 1)
GET (0, y)-(x, y), prevy
GET (x, 0)-(x, y), prevx
GET (x, y)-(x + zoom, y + zoom), prev
END IF
CASE CHR$(9)
savepic
END SELECT
LOOP
END SUB
SUB savepic
CLS
a = 1
SCREEN 1
INPUT "Save name:", filename$
filename$ = filename$ + ".pic"
PRINT filename$; " saved"
SCREEN 13
cx = sx
cy = sy
OPEN filename$ FOR OUTPUT AS #1
WRITE #1, cx, cy
FOR cy = 1 TO sy
FOR cx = 1 TO sx
WRITE #1, col(cx, cy)
NEXT
NEXT
CLOSE #1
CLS
IF a = 1 THEN END
EXIT SUB
END SUB
SUB zoomchange
ay = 0
FOR y = 1 TO 200 * zoom STEP zoom
ay = ay + 1
bx = 0
FOR x = 1 TO 320 * zoom STEP zoom
bx = bx + 1
LINE (x, y)-(x + zoom, y + zoom), col(bx, ay), BF
NEXT
NEXT
x = 1
y = 1
sx = 1
sy = 1
END SUB
Help!
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
take a look for yourself, i froze it right as the compiler was being called.
this is one of the most painful limitations of qb, this is why fb is so popular is becuz of things like this. once you get the qb training wheels off i say go for fb fullspeed :P
|