View Single Post
  #1  
Old 03-11-2002, 11:46 AM
Stud
Sarnak
 
Join Date: Jan 2002
Posts: 44
Default WesQuests.cpp on 2.4 Pre 5

Need a bit of help from someone in the know. I'm attempting to create quests scripts on my Linux server.

At first the zone was unable to locate the Quests folder and the zonename.qst files inside it. This I was able to correct by changing line 125 from reading:

_snprintf(filename, 254, "Quests\\%s.qst", zonename);
if (pFile = fopen ( filename , "rb" )) {
printf("Reading quests from %s\n", filename);
}

to

_snprintf(filename, 254, "./Quests/%s.qst", zonename);
if (pFile = fopen ( filename , "rb" )) {
printf("Reading quests from %s\n", filename);
}

Now it locates and attempts to read the file whenever you hail an NPC but immediately crashes the zoneserver with a segmentation fault when you do.

As long as you have no quest script in the Quests directory for the zone you are in, it functions fine. But if you have a .qst file, even a blank one, for the zone you are in in the Quests directory. It immediately crashes the zoneserver when hailing an NPC.

The quests do however work properly on a windows server.

Can someone possibly you Misa (wink wink) take a look at WesQuests.cpp and see what else other than the backslash problem would keep it from functioning the same under Windows as it does Linux, I've looked at it, and I just don't see it.
Reply With Quote