Code: Select all
CHAR ZoneName[] = {0};
sprintf( ZoneName, "%s", CharLower(Zone.ZoneNameShort));
static const char* zoneNames[] =
{
#include "zones.h" //taken from ShowEQ source
};
for (int i = 0; i < (sizeof(zoneNames) / sizeof (char*)); i++) {
if (ZoneName == zoneNames[i]) {
zoneID = i;
}
}
I have also used various other things in place of ZoneName == zoneNames (ie, stricmp())....all seem to crash EQ.

