mpl question
From
dream master@46:1/102 to
g00r00 on Mon Dec 14 00:02:35 2015
i got my master mind mpl working and there is ony one part not working. the player data file. gryphon helped me with the new updates but it does not seem to work. perhaps you can see the error. every time i load the game it ask if
i want to play the game and adds another record not detecting the current record of some one playing for the second or more time. here is my player record
Type
Userdata = Record
index : integer;
handle : string[35];
wins : word;
lastwin : longint;
end;
this is where it looks to see if the player exist or add a new one. the total record is 44bytes
procedure checkuser
var tmpstr : string
var tmpwins: word
var currec : integer
var done : boolean
begin
fassign(scores, cfgdatapath + 'dm-mm.dat',66)
uexist:=false
currec:=1
done:=false
while not uexist and not done do begin
freset (scores) // send the pointer to the top of the file
fseek(scores,(currec-1) * sizeof(urec)) // Seek to the currec-1
if feof(scores) then done:=true
if urec.handle = useralias then
uexist := true
currec:=currec+1 // increment to the next record
end
fclose(scores)
if uexist = false then begin adduser end
end
can you see any errors in it? other weird things are happening but this would help get us started to resovling this.
this is also where it shows users stats
procedure stats
begin
ClrScr
dispfile('mm-ustat')
fAssign(scores, cfgdatapath + 'dm-mm.dat',66)
freset(scores)
fseek(scores,(urec.index-1)*sizeof(urec))
freadrec(scores,urec)
writeln('|[X34|[Y07|10' + int2str(urec.index))
writeln('|[X33|[Y08|10 ' + urec.handle)
writeln('|[X33|[Y09|10 ' + int2str(urec.wins))
if urec.wins = 0 or urec.wins < 1 then
writeln('|[X33|[Y10|10 xx/xx/xx') else
writeln('|[X33|[Y10|10 ' + datestr(urec.lastwin,1))
write('|[X02|[Y15|PA')
fclose(scores)
we are wondering why it does not work. it works on his linux mystic but hs changes do not effect me on windows.
thanks.
--- Mystic BBS v1.11 (Windows)
* Origin: fluph.darktech.org (46:1/102)