Page 1 of 1 1
Topic Options
#61293 - 2001-12-12 06:46 PM Dr Watson error Kix access Violation
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Would anyone happen to know why this error in Windows NT server occured. I debuged the code and it get the error in this section of the code.
code:

;------Finds an Superdat in the Server path
$sdatName=Dir($ServPath + "sdat*.exe")
;------Look for a more recent superdat
While $sdatName <>"" And @ERROR = 0
If $sdatname <>""
$sname=$sdatname
EndIf
$sdatName=Dir() ; retrieve next file
Loop

;------Find an Extra dat file in the server path
$XdatName=Dir($ServPath + "*xdat.exe",0)
;------Look for a more recent extra dat file
While $XDatName <>"" And @ERROR = 0
If $XDatname <>""
$Xname=$XDatname
EndIf
$XDatName=Dir() ; retrieve next file
Loop

;------Look for the available engine version
$EngName=Dir($ServPath + "*eng.exe",1)
;------Look for a more recent Engine file
While $EngName <>"" And @ERROR = 0
If $EngName <>""
$Ename=$EngName
EndIf
$EngName=Dir() ; retrieve next file
Loop



It errors out on the engine name only. The xdat and the sdat pick up fine.
Tha actual error code is
Exception: access violation (0xc0000005), address 0x77f6ce4c by kix32.exe

Thanks Will

_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
#61294 - 2001-12-12 06:58 PM Re: Dr Watson error Kix access Violation
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Will,

Haven't tried this, but quickly you might want to try this on your last dir()

$EngName=Dir("",1) ; retrieve next file

-Shawn

Top
#61295 - 2001-12-12 07:10 PM Re: Dr Watson error Kix access Violation
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Hi Will,

You only have to use the index if you enumerate two dirs at the same time. Since you have them after eachother, you can remove all indexes.

code:
;------Finds an Superdat in the Server path
$sdatName=Dir($ServPath + "sdat*.exe")
;------Look for a more recent superdat

While $sdatName <>"" And @ERROR = 0
If $sdatname <>""
$sname=$sdatname
EndIf
$sdatName=Dir() ; retrieve next file
Loop

;------Find an Extra dat file in the server path
$XdatName=Dir($ServPath + "*xdat.exe")
;------Look for a more recent extra dat file
While $XDatName <>"" And @ERROR = 0
If $XDatname <>""
$Xname=$XDatname
EndIf
$XDatName=Dir() ; retrieve next file
Loop

;------Look for the available engine version
$EngName=Dir($ServPath + "*eng.exe")
;------Look for a more recent Engine file
While $EngName <>"" And @ERROR = 0
If $EngName <>""
$Ename=$EngName
EndIf
$EngName=Dir() ; retrieve next file
Loop


If this doesn't help, maybe there is something wrong in another part of the script?

A forgotten ENDIF or a misplaced " can wreak havoc to your script.

_________________________
The Code is out there

Top
#61296 - 2001-12-12 09:05 PM Re: Dr Watson error Kix access Violation
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Guys,
I took out the references to the indexes like drill sergeant suggested and it worked.
Thanks Will

[ 12 December 2001: Message edited by: Will Hetrick ]

[ 12 December 2001: Message edited by: Will Hetrick ]

_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.062 seconds in which 0.033 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org