View Single Post
  #5  
Old 05-07-2002, 06:20 AM
Boogahed
Fire Beetle
 
Join Date: May 2002
Posts: 28
Default

Any quest file will cause a crash when you hail any npc, even a completely blank .qst file will make it crash.

I did create a simple .qst file for testing purposes and narrowed down the exact lines of code causing the probem.

NPC_SCRIPT 4009 {
TRIGGER_TEXT:Hail:{
EMOTE:Grins at you.
}

(note : If I use the ZoneNT.exe that I downloaded with the binary distribution, this quest works perfect.)

In this example, lines 1 and 2 get read in fine, line 3 causes a crash.

In WesQuests.cpp, the CheckQuests function initiates a loop at line 153:

for(int i=0; i < 2048; ++i)

the way I understand it 'i' will increase by one for each line in the quest file, the commands will get extracted from the line and then pass thru a 'if / else if' sequence set up for each command available.
At the end of this loop, at line 495 we have this code:

#ifdef WIN32
delete command;
delete temp;
#endif

line 496 is where the problem is. On lines 1 and 2 of the quest file this code executes with no problem, but on line 3, the line that has the EMOTE command, a crash will occur just after the the command is executed and it hits the 'delete command' line.

The player will see a message like "Priest of Discord grins at you.", then see the zone shutdown mesages right after.
This will occur on the first command found in any quest file. If I had a SAY command there instead of EMOTE, it would have crashed after the SAY command.

I'm not really sure why a blank .qst file would cause the problem, I just found out about that one yesterday when someone in IRC reported having the same problems as me.

The only thing I really haven't tried at this point is loading up a machine with Windows XP and compiling there, but several people tell me they have compiled under Windows 2000 ok.

I've also installed Visual C++ 6 from the CD then applied service pack 5 right after, just to make sure nothing was wrong with my VC++ installation. I compile programs all the time and have never had problems before though.
I also borrowed a copy of Developer's Studio (rather than the VC++ standalone I have), installed that onto a machine and got the exact same compile.
Reply With Quote