[MYSQL] Once the function is loaded, the server crashes.
#1

Hi, I've been trying to find this problem for a while now, I debugged the function and noticed the whole function makes the server crash (( Not just a part of it )). Anyone got an idea why it's crashing?

pawn Код:
stock LoadMaps()
{
  mysql_query("SELECT * FROM `Maps`");
  mysql_store_result();
  new idx;
  while (idx < sizeof(MapInfo))
  {
        mysql_fetch_row_format(resultline,"|");
        split(resultline, player, '|');

      MapInfo[idx][Model] = strval(player[0]);
      MapInfo[idx][X] = floatstr(player[1]);
      MapInfo[idx][Y] = floatstr(player[2]);
      MapInfo[idx][Z] = floatstr(player[3]);
      MapInfo[idx][RX] = floatstr(player[4]);
      MapInfo[idx][RY] = floatstr(player[5]);
      MapInfo[idx][RZ] = floatstr(player[6]);
      CreateObject(MapInfo[idx][Model], MapInfo[idx][X], MapInfo[idx][Y], MapInfo[idx][Z], MapInfo[idx][RX], MapInfo[idx][RY], MapInfo[idx][RZ]);
      idx++;
    }
}

Reply
#2

Try looking into the mysql_debug log. Most likely would be caused by Model not being loaded correctly and creating an object with the ID of 0.
Reply
#3

Quote:
Originally Posted by Chaprnks
Try looking into the mysql_debug log. Most likely would be caused by Model not being loaded correctly and creating an object with the ID of 0.
Nothing, this what just shows up:
Код:
[22:33:42] 

[22:33:42] ---------------------------

[22:33:42] MySQL Debugging activated (01/26/10)

[22:33:42] ---------------------------

[22:33:42]
Reply
#4

Bump
Reply
#5

Quote:
Originally Posted by Seif_
Hm, maybe you can't just do SELECT * FROM Maps, you probably need to select a field to load.
Still crashes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)