freebasic compiling problems
Posted: Mon Oct 23, 2006 6:17 pm
I'm using FreeBasic Compiler to compile a Qbasic program I wrote. Unfortunately, I keep getting errors that say:
Does anyone know what those error codes are caused by? Do I have to define my line labels differently or something? And what does "implict variable allocation" mean?
Thanks a lot.
Here is the beginning of my code. This code works fine when running inside of Qbasic itself. I edited out the sub declarations at the beginning.C:\qbfiles\fbasic>fbc example/uncle.bas
example/uncle.bas(1543) : warning level 0: Implicit variable allocation, rathole3num
example/uncle.bas(2420) : warning level 0: Implicit variable allocation, pianonum
example/uncle.bas(3046) : warning level 0: Implicit variable allocation, paintingnum
example/uncle.bas(290) : error 95: Branching to other SUB's/FUNCTION's or to mod
ule-level, to label: ROOM1
example/uncle.bas() : error 48: Undefined label, ROOM1
example/uncle.bas() : error 48: Undefined label, STORY
example/uncle.bas() : error 48: Undefined label, HELP
example/uncle.bas() : error 48: Undefined label, ABOUT
example/uncle.bas() : error 48: Undefined label, LOG1
example/uncle.bas() : error 48: Undefined label, LOG2
example/uncle.bas() : error 48: Undefined label, LOG3
example/uncle.bas() : error 48: Undefined label, VINE1
example/uncle.bas() : error 48: Undefined label, VINE2
example/uncle.bas() : error 120: Too many errors, exiting
Code: Select all
start: CLS
treasurenum = 0
revolvernum = 0
armsnum = 0
bulletnum = 0
vinenum = 0
hammernum = 0
key1num = 0
lanternnum = 0
shovelnum = 0
ballnum = 0
key2num = 0
key3num = 0
laddernum = 0
acidnum = 0
apekillnum = 0
new = 1
log1num = 0
log3num = 0
vine2num = 0
gravenum = 0
pitnum1 = 0
pitnum2 = 0
moundnum = 0
arm2num = 0
arm3num = 0
arm4num = 0
grassnum = 0
pantherkillnum = 0
dogkillnum = 0
benchnum = 0
tdoor1num = 0
tdoor2num = 0
bucketnum = 0
hole1num = 0
bricknum = 0
cranknum = 0
dropnum = 0
mutantkillnum = 0
rathole1num = 0
rathole2num = 0
rathol3num = 0
door14num = 0
pouchnum = 0
chestnum = 0
ballcount = 0
rashnum = 0
rashcount = 0
orchidcount = 0
skeletonnum = 0
engravenum = 0
catnum = 0
eelnum = 0
clocknum = 0
engravecount = 0
tdoor2num = 0
dogrunnum = 0
spicenum = 0
spicekillnum = 0
bagnum = 0
woodchestnum = 0
biscuitnum = 0
mechmannum = 0
maneatnum = 0
vaultnum = 0
ballgrabnum = 0
winnum = 0
bednum = 0
pillownum = 0
levernum = 0
safenum = 0
flowernum = 0
flashnum = 0
kawandusnum = 0
hogkillnum = 0
hammerdoor = 0
COLOR 8
PRINT " Uncle Andrew's Manor"
PRINT ""
COLOR 3
PRINT " A game by Andi Hagen"
PRINT ""
COLOR 6
PRINT "(a) begin"
PRINT "(b) story"
PRINT "(c) instructions"
PRINT "(d) about"
PRINT "(e) quit"
PRINT ""
COLOR 7
PRINT "What is your choice"; : INPUT choice$
IF choice$ = "a" THEN GOTO room1
IF choice$ = "b" THEN GOTO story
IF choice$ = "c" THEN GOTO help
IF choice$ = "d" THEN GOTO about
IF choice$ = "e" THEN GOTO quit
GOTO start
story:
CALL story
GOTO start
help:
CALL help
GOTO start
quit: END
about:
CALL about
GOTO start
''''''''''''''''''''''''''''''''''''''''''''''
room1:
IF ballnum = 1 THEN ballcount = ballcount + 1
IF ballcount = 10 THEN
CALL ballboom
GOTO start
END IF
Thanks a lot.