[bugfix]Clan points

Put your bugs you find in osRose here

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[bugfix]Clan points

Postby hoegarden31 on Sun Mar 11, 2012 12:02 am

Hello,
a few minutes ago got a crash again. And it was because there was a DB-QFree() missing again.
So go in you worldserver, look for the file extrafunctions.cpp
And go to the function getClanPoints and replace it by this one :
  1. //LMA: We get the exact Clan Points amount through mysql database
  2. UINT CWorldServer::getClanPoints(int clanid)
  3. {
  4.     UINT nb_points=0;
  5.  
  6.     MYSQL_RES *result = GServer->DB->QStore("SELECT cp FROM list_clan where id=%i", clanid);
  7.     if(result==NULL){
  8.         GServer->DB->QFree();
  9.         return 0;
  10.     }
  11.     if(mysql_num_rows(result)!=1)
  12.     {
  13.         GServer->DB->QFree();
  14.         return 0;
  15.     }
  16.     else
  17.     {
  18.         MYSQL_ROW row = mysql_fetch_row(result);
  19.         nb_points= atoi(row[0]);
  20.     }
  21.  
  22.     GServer->DB->QFree( );
  23.  
  24.  
  25.     return nb_points;
  26. }
I'm the one and only. In heaven and on earth.
Image
hoegarden31
Rackie
Rackie
 
Posts: 150
Joined: Sun Nov 13, 2011 7:13 pm

Return to Bugs

Who is online

Users browsing this forum: No registered users and 7 guests