FreeBASIC problems

The forum for all of your Freebasic needs!

Moderators: Pete, Mods

Post Reply
RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

FreeBASIC problems

Post by RayBritton » Sun Feb 13, 2005 3:09 pm

Will is it that when i try and compile this code

Code: Select all

RANDOMIZE TIMER / 3

arearetrival:
monum = INT((3 - 1 + 1) * RND + 1)
SELECT CASE area
CASE 0
   GOTO runerror
CASE 1
   IF monum = 1 THEN monfilename$ = "areaone1.mon"
   IF monum = 2 THEN monfilename$ = "areaone2.mon"
   IF monum = 3 THEN monfilename$ = "areaone3.mon"
   GOTO loadmonfile
CASE 2
   IF monum = 1 THEN monfilename$ = "areatwo1.mon"
   IF monum = 2 THEN monfilename$ = "areatwo2.mon"
   IF monum = 3 THEN monfilename$ = "areatwo3.mon"
   GOTO loadmonfile
CASE 3
   IF monum = 1 THEN monfilename$ = "areathr1.mon"
   IF monum = 2 THEN monfilename$ = "areathr2.mon"
   IF monum = 3 THEN monfilename$ = "areathr3.mon"
   GOTO loadmonfile
CASE 4
   IF monum = 1 THEN monfilename$ = "areafor1.mon"
   IF monum = 2 THEN monfilename$ = "areafor2.mon"
   IF monum = 3 THEN monfilename$ = "areafor3.mon"
   GOTO loadmonfile
CASE 5
   IF monum = 1 THEN monfilename$ = "areafiv1.mon"
   IF monum = 2 THEN monfilename$ = "areafiv2.mon"
   IF monum = 3 THEN monfilename$ = "areafiv3.mon"
   GOTO loadmonfile
CASE 6
   IF monum = 1 THEN monfilename$ = "areasix1.mon"
   IF monum = 2 THEN monfilename$ = "areasix2.mon"
   IF monum = 3 THEN monfilename$ = "areasix3.mon"
   GOTO loadmonfile
CASE 7
   IF monum = 1 THEN monfilename$ = "areasev1.mon"
   IF monum = 2 THEN monfilename$ = "areasev2.mon"
   IF monum = 3 THEN monfilename$ = "areasev3.mon"
   GOTO loadmonfile
CASE 8
   IF monum = 1 THEN monfilename$ = "areaeig1.mon"
   IF monum = 2 THEN monfilename$ = "areaeig2.mon"
   IF monum = 3 THEN monfilename$ = "areaeig3.mon"
   GOTO loadmonfile
CASE 9
   IF monum = 1 THEN monfilename$ = "areanin1.mon"
   IF monum = 2 THEN monfilename$ = "areanin2.mon"
   IF monum = 3 THEN monfilename$ = "areanin3.mon"
   GOTO loadmonfile
CASE 10
   IF monum = 1 THEN monfilename$ = "areaten1.mon"
   IF monum = 2 THEN monfilename$ = "areaten2.mon"
   IF monum = 3 THEN monfilename$ = "areaten3.mon"
   GOTO loadmonfile
CASE 11
   IF monum = 1 THEN monfilename$ = "areaele1.mon"
   IF monum = 2 THEN monfilename$ = "areaele2.mon"
   IF monum = 3 THEN monfilename$ = "areaele3.mon"
   GOTO loadmonfile
CASE 12
   IF monum = 1 THEN monfilename$ = "areatwe1.mon"
   IF monum = 2 THEN monfilename$ = "areatwe2.mon"
   IF monum = 3 THEN monfilename$ = "areatwe3.mon"
   GOTO loadmonfile
END SELECT
runerror:
PRINT "No area code was found"
loadmonfile:
PRINT monfilename$
' OPEN monfilename$ FOR INPUT AS #1
' get #1,monhp,monmp,monmag,monstr,mondef,monacl,monmcl,monpic
' close #1

i get this error

Code: Select all

Unkown error 
you didn't save file as .bas (i did)
some library/include header is not linked 
On Line:

User avatar
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 » Sun Feb 13, 2005 4:06 pm

:) Okay, some IDEs you need to type your file like this when you save:

Filename.BAS 'Notice with the ".BAS" at the end..

Others add the .BAS for you, the one I have does.. you must have a older or a version that doesn't, you need to type .BAS yourself.

Now, your not going to see what happens in this file,. at the very end of the whole thing you need to insert SLEEP, this will pause the ending prog until key is pressed, otherwise it will automaticly close..

By looking at this, you got one you have to save and compile every time you run, you need to get one like VonGodric's that has a QuickRun (F5), this is much easier to code with. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Sun Feb 13, 2005 4:26 pm

Are you sure you have enabled file extensions in windows XP? If you havent you wont be able to change it to a .BAS file.

It compiles fine for me.



If you're not using an IDE, you need to type:
fbc yourbasfile.bas

You MUST include the .BAS extension.
I have left this dump.

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Sun Feb 13, 2005 4:38 pm

Ummmm...FB probl, in a QB site!...ramble...ramble....ramble...

Excuseee me for my rambling.... :D
"But...It was so beutifully done"

Guest

Post by Guest » Sun Feb 13, 2005 5:39 pm

i'm using win98
yes i have a .bas extension

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Sun Feb 13, 2005 6:13 pm

I think that person ^ was RayBritton....

Just a thought..... 8)

Hey, I help out when I can :P !
"But...It was so beutifully done"

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Sun Feb 13, 2005 6:29 pm

It compiles fine for me, weird..

Are you using VonGodrics IDE?

Try compiling from the commandline. Thats what I did, which worked.





Mitth, got nothing to say that is relevant to the topic, then please, stfu.
I have left this dump.

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sun Feb 13, 2005 6:53 pm

Mitth'raw'nuruodo wrote:Ummmm...FB probl, in a QB site!...ramble...ramble....ramble...

Excuseee me for my rambling.... :D
If this site hosts a qb/fb mag, why not qb/fb forums?!
Image

User avatar
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 » Sun Feb 13, 2005 8:11 pm

:) It sound like you got a bad IDE, I once had one that wouldn't compile QB gfxs, you may want to look into VonGodric's.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)

User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo » Sun Feb 13, 2005 9:41 pm

Ummm ok Nate but that hasn't happened yet :)

You're really bent up on this IDE aren't you Rattra? :D

:shock: Opps...sorry Z!re I forgot....
"But...It was so beutifully done"

Post Reply