[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2005-07-27T12:27:46-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/721 2005-07-27T12:27:46-05:00 2005-07-27T12:27:46-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5790#p5790 <![CDATA[searching a file for specific data]]> ...only there's one problem is that the Maximum File Size is wrong...the help was written when hard drives weren't bigger than 2Gig. DOS imposes a 2 Gig limit to a data file size.

Statistics: Posted by MystikShadows — Wed Jul 27, 2005 12:27 pm


]]>
2005-07-27T11:56:17-05:00 2005-07-27T11:56:17-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5789#p5789 <![CDATA[Just for clarification...]]> (Coppied verbatim)

Code:

 File  Edit  View  Search  Run  Debug  Options───────────────────── HELP: Procedure and File Limits ───────────────── ◄Contents►  ◄Index►  ◄Back►───────────────────────────────────────────────────────────────────────                              Maximum                 Minimum                              ════════════════════    ═══════════Procedure size                64K                     0Number of arguments passed    60                      0Data file numbers             255                     1Data file record number       2,147,483,647           1Data file record size         32K                     1 byteData file size                Available disk space    0Path names                    127 characters          1 characterError message numbers         255                     1 
That should help somewhat. (I think).

Statistics: Posted by UWLabs — Wed Jul 27, 2005 11:56 am


]]>
2005-07-17T16:22:29-05:00 2005-07-17T16:22:29-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5649#p5649 <![CDATA[searching a file for specific data]]>
Type Iteams
IteamName as string*20
iteamclass as integer ' you can sue this as a flag i.e. wapons or
iteamextrainfo as integer ' heal then the next member in the type can
end type 'define the attack or healing power ect

dim iteamlist(100) as iteams


then
open "iteams.itm" for binary as 1

get #1,,iteamlist(0)

the binary get will grab as many byte as the UDT type size in this case it be 24 in qb in fb 28 byte then copy them directly in the udt allocated memorey filling the information in for you.

Statistics: Posted by ShadowWolf — Sun Jul 17, 2005 4:22 pm


]]>
2005-07-16T10:29:46-05:00 2005-07-16T10:29:46-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5618#p5618 <![CDATA[searching a file for specific data]]>
DIM Weap$(100), Weapstat$(100),.. ect

As for FreeBasic, the file sizes can be 2gig, minus the fact that take ages to parse on a slow comp...

What about your parser? Do you need help there too? You can do it, but deff not like your psuedocode... its alot more IF..THENs, MID$, UCASE$ (or LCASE$), ect.. :wink:

EDIT:

A easyer way than parsing would be:

Weapon's File

Code:

Rapawhatever, whateverstat, whatevertype
Reading Code:

Code:

OPEN "File.txt" FOR INPUT AS #1DIM Weapname$(100), Weapstat$(100), Weaptype$(100)cont = 0DOcont = cont + 1 '(In FB it can be done: cont += 1)INPUT #1, Weapname$(cont), Weapstat$(cont), Weaptype$(cont)LOOP UNTIL EOF(1)CLOSE #1

Statistics: Posted by Rattrapmax6 — Sat Jul 16, 2005 10:29 am


]]>
2005-07-16T00:19:48-05:00 2005-07-16T00:19:48-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5607#p5607 <![CDATA[searching a file for specific data]]> add as many as ya want! :)


.....
P.S. is there a limit to how many lines a file can have?....
thanx
Agent_Firestalker
.....
as for number of lines i thinks it like 16,000 line or something
I'm writing a game that quit's when i go over that number
of lines...
I've been using QB and QuickBasic for over 10 years and I have never read or heard of a maximum number of records.

However, I have read advice to define your record counter as LONG. Probably the game that quit around 16 to 32k records was counting in an integer variable. However, this is not a QB restriction on the number of records it can read or write.
*****

Statistics: Posted by Guest — Sat Jul 16, 2005 12:19 am


]]>
2005-07-15T23:34:00-05:00 2005-07-15T23:34:00-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5605#p5605 <![CDATA[searching a file for specific data]]> *****

Statistics: Posted by moneo — Fri Jul 15, 2005 11:34 pm


]]>
2005-07-15T23:31:13-05:00 2005-07-15T23:31:13-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5604#p5604 <![CDATA[searching a file for specific data]]>
.....
P.S. is there a limit to how many lines a file can have?....
thanx
Agent_Firestalker
.....
as for number of lines i thinks it like 16,000 line or something
I'm writing a game that quit's when i go over that number
of lines...
I've been using QB and QuickBasic for over 10 years and I have never read or heard of a maximum number of records.

However, I have read advice to define your record counter as LONG. Probably the game that quit around 16 to 32k records was counting in an integer variable. However, this is not a QB restriction on the number of records it can read or write.
*****

Statistics: Posted by Guest — Fri Jul 15, 2005 11:31 pm


]]>
2005-07-15T21:51:15-05:00 2005-07-15T21:51:15-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5598#p5598 <![CDATA[searching a file for specific data]]>
Basically, if the first entry in the file is the desired weapon, in my example it's the rhomphaia (from Vagrant Story, PS1), then the program reads the next entries on that line and stores them in the appropriate variable. the loop that does all this exits when more than the first entry in a line is read (meaning the correct weapon was found).

P.S. is there a limit to how many lines a file can have? (i'm converting to FB if that makes a difference.

thanx
Agent_Firestalker
i dont know what FB does but your logic looks okay...

as for number of lines i thinks it like 16,000 line or something
im writing a game that quit's when i go over that number
of lines...

Statistics: Posted by Guest — Fri Jul 15, 2005 9:51 pm


]]>
2005-07-15T20:07:32-05:00 2005-07-15T20:07:32-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5595#p5595 <![CDATA[searching a file for specific data]]>
P.S. is there a limit to how many lines a file can have? (i'm converting to FB if that makes a difference.

thanx
Agent_Firestalker

Statistics: Posted by Agent_Firestalker — Fri Jul 15, 2005 8:07 pm


]]>
2005-07-15T15:40:19-05:00 2005-07-15T15:40:19-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5586#p5586 <![CDATA[searching a file for specific data]]> Statistics: Posted by Zamaster — Fri Jul 15, 2005 3:40 pm


]]>
2005-07-15T15:34:52-05:00 2005-07-15T15:34:52-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=5585#p5585 <![CDATA[searching a file for specific data]]>
you type up a text file of say, items, for an RPG.
the format of each line in file is... Weaponname$, weapdam,weapclass,etc
i have a loop like this (i'm writing psuedocode, so don't take literally)

do
read weaponname$
if weaponname$ = "Rhomphaia" then get rest of line
else goto next line
loop until weapnclass or weapndam = something

Is this flawed?

thanx
Agent_Firestalker

Statistics: Posted by Agent_Firestalker — Fri Jul 15, 2005 3:34 pm


]]>