--------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D5K00000 Date: 05/08/96 From: LAWRENCE GORDON Time: 11:04pm \/To: STEVEN ANDERSON (Read 4 times) Subj: Re: PB 3.0a Vs 3.2 Quoting Steven Anderson to Lawrence Gordon: SA> Ok, now, where can I buy PB 3.2?? Contacting PowerBASIC, Inc. =========================== Address: PowerBASIC, Inc. 316 Mid Valley Center Carmel, Ca 93923 Sales: Orders (800) 780-7707 Cust. Service (408) 659-8000 Fax (408) 659-8008 Tech Support: Voice (408) 659-8000 Fax (408) 659-8008 BBS (408) 659-7401 (8-N-1, 2400-28.8k) CompuServe: GO POWERBASIC, section 12 Sales & Marketing 73621,2613 Tech Support 74431,3520 Research & Development 75300,1742 Internet: List of Internet Addresses info@powerbasic.com Order Form order@powerbasic.com Product List products@powerbasic.com Third Party List third@powerbasic.com Sales & Marketing sales@powerbasic.com Tech Support support@powerbasic.com Research & Development r&d@powerbasic.com * WCE 2.1G1/2081 * --- InterEcho 1.18 * Origin: Toast House * (314) 994-0312 * (1:100/560) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D5K00001 Date: 05/15/96 From: RON SCRIVANI Time: 9:32am \/To: ALL (Read 4 times) Subj: test This is a test to see if this is getting out to anyone... --- InterEcho 1.18 * Origin: Jesus is The Greatest Sysop of Them All! (1:2624/404) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D5K00002 Date: 05/14/96 From: RAY TODD Time: 10:23pm \/To: ALL (Read 4 times) Subj: Please Help Hello Everyone, I am a NEW powerbasic trainee (note the emphasis on new). As a result, I am in the need for some advise and instuction. Please note the code below. You will notice that at the beginning, I open a file to get the data into the program then close it. The next portion of the code involves inputing new information into the program. As you will notice, I am opening the file again to append any new info to the file. This is where I am having problem and don't understand exactly what the reference guide is telling me. At some point, I think I have the problem resolved then it keeps coming back. When I am in the editor stepping through the program, it will append the newly added information to the file without problem. However, when I have compiled the program and am running the exe, it will not append the file? What am I overlooking/ignoring? --------------------------- OPTION BASE 1 OPEN "CARSHOW1.TXT" FOR INPUT AS #1 INPUT #1 ,regno$,lastname$,firstname$,address$,city$,state$,zip!,phone PRINT regno$; lastname$; firstname$; address$; city$ ; state$; zip!; CLOSE #1 CLS While (regno$ <> "END") 'continue until name = "END" Input "Registration Number: ";regno$ IF (regno$ <> "END") then 'Checking the 'end' statement Input "Last Name: ";lastname$ Input "First Name: ";firstname$ Input "Address: ";address$ Input "City: ";city$ Input "State: ";state$ Input "Zip: ";zip! Input "Phone: ";phone$ Input "Registration Fee: ";regfee! Input "Model Year: ";modelyr$ Input "Model: ";model$ cls OPEN "CARSHOW1.TXT" FOR APPEND AS #1 write #1 ,regno$,lastname$,firstname$,address$,city$,regfee! close #1 count% = count% + 1 end if wend OPEN "CARSHOW1.TXT" FOR OUTPUT AS #1 write #1 ,regno$,lastname$,firstname$,address$,city$,regfee! close #1 ------------------------------------ I also have a question in regards to the PRINT USING command. When I use the command per the syntax in the reference guide I keep getting strange results as follows. PRINT USING "&";regno$ "&"lastname$ ###.##;regfee! the result &10&todd###.##15 What am I doing wrong?!' Thanks, Ray. --- ..RayMAIL at the speed of Light * Origin: FIDONET Albatross One Knoxville, TN (423) 281-2471 (1:3615/85) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D5K00003 Date: 05/10/96 From: DAAN OVERMARS Time: 11:04pm \/To: ICC (Read 4 times) Subj: noicemaker Hallo jochem, ik hoop dat je dit bericht goed ontvangt anders is het jammer ik probeer gewoon een beetje alles uit wat er mogelijk is met level 20. Nou tot maandag 10 mei zou ik zeggen. --- -CB!- # Origin: PowerBasic support Internationaal. (119:3102/300) * Origin: United Bbs Systems Europe MailGate to -> Fido USA (2:2802/337.0) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D5K00004 Date: 05/15/96 From: TOM PHILLIPS Time: 11:53pm \/To: ALL (Read 4 times) Subj: L.O.R.D Program Greetings All, I am attempting to do some L.O.R.D. IGM's and a Monster editor but am having some trouble with the structures.. I am not a seasoned programmer but have written 3 doors and have had good success at creating other utilities.. Here is a small do nothing program that should list the first monster in LENEMY.DAT but I get blank strings and 0 values returned when I run it.. I am obviously missing something :-/ Is anyone out there familiar with the data files for the L.O.R.D. game?? DEFINT A-Z DIM strng AS LONG DIM gld AS LONG DIM expe AS LONG DIM hitp AS LONG TYPE MonsterRec MName AS STRING * 60 Strength AS LONG Gold AS LONG Weapon AS STRING * 60 ExPoints AS LONG HitPoints AS LONG Death AS STRING * 100 END TYPE DIM MonRec AS MonsterRec OPEN "LENEMY.DAT" FOR RANDOM ACCESS READ SHARED AS #1 LEN = LEN(MonRec) P! = 1 REM DO GET #1, P! A$ = MonRec.MName strng = MonRec.Strength gld = MonRec.Gold B$ = MonRec.Weapon expe = MonRec.ExPoints hitp = MonRec.HitPoints C$ = MonRec.Death P! = P! + 1 REM LOOP WHILE NOT EOF(1) CLOSE #1 CLS LOCATE 7, 1: COLOR 14, 0: PRINT "MonsterName: " + A$ PRINT "MonsterPower =" + STR$(strng): PRINT "Experience =" + STR$(expe) PRINT "Gold =" + STR$(gld): PRINT "WeaponName: " + B$ PRINT "HitPoints =" + STR$(hitp): PRINT "DeathCry: " + C$ COLOR 7, 0: PRINT "------------------------------------" PRINT "RecLen =" + STR$(LEN(MonRec)) END The record length is coming up as 236.. Is this correct? Are these files indeed, Random Access files? Also in my OPEN "player.dat" etc., I come up with a record length of 248.. Is this correct or do I have something formatted incorrectly? It all looks correct but it's not :-/ ... Tom Phillips Internet: T.Phillips@phil.node99.com --- -=[RA 2.02/pro]=- * Origin: Phil's Place IV {RIP Graphics} [610] 252-6223 or 8633 (1:2607/303) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D5L00000 Date: 05/16/96 From: ANTON MONROE Time: 07:39am \/To: RAY TODD (Read 4 times) Subj: Please Help RT> OPEN "CARSHOW1.TXT" FOR APPEND AS #1 RT> write #1 ,regno$,lastname$,firstname$,address$,city$,regfee! RT> close #1 You're doing okay up to this point... RT> OPEN "CARSHOW1.TXT" FOR OUTPUT AS #1 RT> write #1 ,regno$,lastname$,firstname$,address$,city$,regfee! RT> close #1 Here's the problem. You are using APPEND correctly, but then you reopen the file for output, which erases the file and starts over. But it looks like even if you change it to append, you shouldn't need this write at all-- the last set of data gets written before you exit the while/wend loop. By the way, there is a discrepancy between the data that exists in the file (city, state, zip) and what you append (city, regfee). That's likely to cause problems later. RT> PRINT USING "&";regno$ "&"lastname$ ###.##;regfee! I don't use PRINT USING much, but if I understand the manual correctly, you can have multiple expressions, but only one format string per PRINT statement. Try something like this, to print the first string, a space, second string, the number: PRINT USING "& &###.##";regno$,lastname$, regfee! A couple of other suggestions that you didn't ask for: "OPTION BASE 1" isn't needed, it only applies if you open a file for binary. And usually it isn't safe to assume the user will be typing in all capitals-- What if he happens to type "end" instead of "END"? You could handle that with IF ucase$(regno$) <> "END" THEN For that matter, it may not be obvious, but a string returned by INPUT doesn't have to contain any letters at all. You could just tell the user to quit by hitting on a blank registration number field, and use IF regno$ <> "" THEN * RM 1.31 1209 * Anton Monroe 70304.3663@compuserve.com --- FidoPCB v1.4 [ff013/c] * Origin: Sound Advice - 24 Nodes (816)436-4516 (1:280/333) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: D5L00001 Date: 05/16/96 From: JAMES GOLDBLOOM Time: 06:19pm \/To: TOM PHILLIPS (Read 4 times) Subj: Re: L.O.R.D Program Here's a guess, Tom: TP> DIM MonRec AS MonsterRec Change that to: DIM MonsterRec as MonsterRec In essence, just use MonsterRec as your buffer, as you defined within the TYPE structure. All member names will be appended to THAT associated name, Tom. Above, you dimensions "Monrec" with the correcr size, but below you accessed allocated memory which is fine, but not where your data is stored! In other words, MonRec points to nothing holding data! TP> A$ = MonRec.MName TP> strng = MonRec.Strength TP> gld = MonRec.Gold TP> B$ = MonRec.Weapon TP> expe = MonRec.ExPoints TP> hitp = MonRec.HitPoints Bearing in mind the principle you define a TYPE, give it a name, them DIM the name as itself, you use each member name appended to the TYPE (BUFFER) name, as your variables - without the need to copy over nything as THEY (BUFFER.MEMBERNAME) are valid. All this is unnecessary, delete it, and use the BUFFER.MEMBERNAME variables in the following code below, so as not to be redundant and slow down your program and waste memory: TP> LOCATE 7, 1: COLOR 14, 0: PRINT "MonsterName: " + A$ Change a$ in the above line to MonsterRec.Mname (do the rest of the variables also with their respective replacements) I did not test this, so hope it works. -James (SysOp/AD Message System) --- QuickBBS 2.80 (Zeta-1.9A) * Origin: [Team QuickBBS] [Team OmegaSoft] [PB Fanatic!] (1:109/611@FIDONET)