View Single Post
  #3  
Old 07-05-2008, 05:12 PM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

oops that

Code:
///////ADDED//////////////////////
//spider661 - load server variables
	if (npcmob->GetQglobal())
	{
	char errbuf[MYSQL_ERRMSG_SIZE];
    char *query = 0;
    MYSQL_RES *result;
	MYSQL_ROW row;
	char tmpname[65];

		database.RunQuery(query, MakeAnyLenString(&query, "SELECT name,value FROM server_globals"), errbuf, &result);
		printf("%s\n",query);
		printf("%s\n",errbuf);	
		if (result)
		{
			printf("Loading global variables for %s\n",npcmob->GetName());
			while ((row = mysql_fetch_row(result)))
			{
				sprintf(tmpname,"%s.g",row[0]);
				AddVar(tmpname, row[1]);
			}
		mysql_free_result(result);
		}
		else{
			LogFile->write(EQEMuLog::Error, "Error in GetServerInt query", query, errbuf);
			}
		if (query)
		{
			safe_delete_array(query);
			query=0;
		}
	}
//////////////END ADDED////////////
it should be this in parser.cpp not the above but that still dont fix it
Reply With Quote