Пользователь
- Регистрация
- 22 Авг 2024
- Сообщения
- 12
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
new serverType, baseInfo[][][] =
{
{"Ëîêàëüíûé ñåðâåð", "127.0.0.1", "gs222", "gs222", "Babanet"},
{"Òåñòîâûé ñåðâåð", "65.108.99.34", "gs222", "gs222", "Babanet"},
{"Arizona Name", "65.108.99.34", "gs222", "gs222", "Babanet"}
};
GetServerVarAsString("bind", mysql_string, sizeof(mysql_string));
if(TextFind(mysql_string, "127.0.0.1")) serverType = 1;
else if(TextFind(mysql_string, "65.108.99.34")) serverType = 2;
else if(TextFind(mysql_string, "65.108.99.34)) serverType = 3;
else return printf(" [DataBase %s]: Ìîä çàïóñòèëñÿ íå íà ïðåäóñìîòðåíîì ñåðâåðå! (error: serverType or baseInfo)", Setting_Server[7]);
mysql = mysql_connect(baseInfo[serverType-1][1], baseInfo[serverType-1][2], baseInfo[serverType-1][3], baseInfo[serverType-1][4]);
if(!mysql_errno(mysql))
printf(" [DataBase %s]: Îøèáîê íå âûÿâëåíî, çàãðóçêà ïðîäîëæàåòñÿ!", Setting_Server[7]);
else
printf(" [DataBase %s]: Íàéäåíà îøèáêà '%d', ïîâòîðÿåì ïîäêëþ÷åíèå.", Setting_Server[7], mysql_errno(mysql));
new serverType, baseInfo[][][] =
{
{"Ëîêàëüíûé ñåðâåð", "127.0.0.1", "gs222", "gs222", "Babanet"},
{"Òåñòîâûé ñåðâåð", "65.108.99.34", "gs222", "gs222", "Babanet"},
{"Arizona Name", "65.108.99.34", "gs222", "gs222", "Babanet"}
};
GetServerVarAsString("bind", mysql_string, sizeof(mysql_string));
if(TextFind(mysql_string, "127.0.0.1")) serverType = 1;
else if(TextFind(mysql_string, "65.108.99.34")) serverType = 2;
else if(TextFind(mysql_string, "65.108.99.34)) serverType = 3;
else return printf(" [DataBase %s]: Ìîä çàïóñòèëñÿ íå íà ïðåäóñìîòðåíîì ñåðâåðå! (error: serverType or baseInfo)", Setting_Server[7]);
mysql = mysql_connect(baseInfo[serverType-1][1], baseInfo[serverType-1][2], baseInfo[serverType-1][3], baseInfo[serverType-1][4]);
if(!mysql_errno(mysql))
printf(" [DataBase %s]: Îøèáîê íå âûÿâëåíî, çàãðóçêà ïðîäîëæàåòñÿ!", Setting_Server[7]);
else
printf(" [DataBase %s]: Íàéäåíà îøèáêà '%d', ïîâòîðÿåì ïîäêëþ÷åíèå.", Setting_Server[7], mysql_errno(mysql));