TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: TOM PHILLIPS
date: 1996-05-15 23:53:00
subject: 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.