Lost connection to the server.
#1

На локалке все работает нормально. Но на хостинге после того как я выхожу из дома или покупаю интерьер меня рестартит (сам клиент)
PHP Code:
else if(dialogid == HOUSE_ID+3)
    {
        if(
response)
        {
            new 
houseid PlayerInfo[playerid][pHouse];
            new 
intnum PlayerInteriorView[playerid]-1;
            if(
intnum == 0)
            {
                
intnum 9;
            }
            if(
intnum == -1)
            {
                
intnum 1;
            }
            new 
intprice PlayerInteriorPrice[playerid];
            if(
BusinessInfo[HOUSE_BIZZ][bFunds] < intnum)
            {
                
ShowMenuForPlayer(HouseMenuplayerid);
                
SCM(playeridCOLOR_GREEN"В магазине 'Всё для дома' не хватает мебели");
                return 
1;
            }
            if(
HouseInfo[houseid][hInterior] == intnum)
            {
                
ShowMenuForPlayer(HouseMenuplayerid);
                
SCM(playeridCOLOR_GREEN"У тебя уже есть этот интерьер дома");
                return 
1;
            }
            if(
GetPlayerMoneyEx(playerid) < intprice)
            {
                
ShowMenuForPlayer(HouseMenuplayerid);
                
f(string"У тебя не достаточно денег. Нужно{5BD93B} %d$"intprice);
                
SCM(playeridCOLOR_GREENstring);
                return 
1;
            }
            
KillTimer(InteriorView[playerid]);
            
GetPlayerInteriorView[playerid] = false;
            
PlayerInteriorView[playerid] = 0;
            
TogglePlayerControllable(playeridtrue);
            
GameTextForPlayer(playerid"~n~"10003);
            
SetCameraBehindPlayer(playerid);
            
SetPlayerVirtualWorld(playeridhouseid);
            
PlayerInfo[playerid][pMir] = houseid;
            
GivePlayerMoneyEx(playerid, -intprice);
            
HouseInfo[houseid][hInterior] = intnum;
            
BusinessInfo[HOUSE_BIZZ][bBalance] += intprice;
            
BusinessInfo[HOUSE_BIZZ][bFunds] -= intnum;
            
f(string"Ты купил новый интерьер за {9DDAF2}%d$"intprice);
            
SCM(playeridCOLOR_WHITEstring);
            
DestroyDynamicPickup(HousePickupInt[houseid]);
            
CreateHouseExitPickup(houseid);
            for(new 
i=0i<GetMaxPlayers(); i++)
            {
                if(
IsPlayerConnected(i))
                {
                    if(
IsInPlayerHouse[i][houseid])
                    {
                        
SetPlayerHouseInterior(ihouseid);
                    }
                }
            }
        }
        else
        {
            
ShowMenuForPlayer(HouseMenuplayerid);
        }
        return 
1;
    } 
Сам диалог после которого рестартит.
Хостинг из дешевых, для теста (Eve-host). Может дело в нагрузке которую создает мой скрипт?
С чем это связано?
Reply
#2

Гадать сложно. Поэтому есть выход такой:
pawn Code:
...
new houseid = PlayerInfo[playerid][pHouse];
print("DEBUG 1");
new intnum = PlayerInteriorView[playerid]-1;
print("DEBUG 2");
...
PlayerInteriorView[playerid] = 0;
print("DEBUG 3");
TogglePlayerControllable(playerid, true);
print("DEBUG 4");
GameTextForPlayer(playerid, "~n~", 1000, 3);
print("DEBUG 5");
...
Reply
#3

Что насчёт crashdetect? Очевидно, перед потерей соединения что-то не так и в коде, возможно он покажет, что.
Reply
#4

Отправляй клиенту сообщения вместо принтов. Может античит срабатывает из-за задержки соединения.
Reply
#5

При подключении плагина crashdetect на линуксе, сервер не включается. server_log:
PHP Code:
[21:16:47]   Loaded.
[
21:16:47]  Loading plugindc_cmd.so
[21:16:47]   Daniel's CMD plugin v2.8
[21:16:47]     © 2014 Daniel_Cortez
[21:16:47]     www.pro-pawn.ru
[21:16:47]   Loaded.
[21:16:47]  Loading plugin: nativechecker.so
[21:16:47]   Loaded.
[21:16:47]  Loading plugin: crashdetect.so
[21:16:47]   CrashDetect must be loaded before '
streamer.so
Reply
#6

Quote:
Originally Posted by Aizov
View Post
При подключении плагина crashdetect на линуксе, сервер не включается. server_log:
PHP Code:
[21:16:47]   Loaded.
[
21:16:47]  Loading plugindc_cmd.so
[21:16:47]   Daniel's CMD plugin v2.8
[21:16:47]     © 2014 Daniel_Cortez
[21:16:47]     www.pro-pawn.ru
[21:16:47]   Loaded.
[21:16:47]  Loading plugin: nativechecker.so
[21:16:47]   Loaded.
[21:16:47]  Loading plugin: crashdetect.so
[21:16:47]   CrashDetect must be loaded before '
streamer.so
А ты переведи что там написано.
Reply
#7

CrashDetect должны быть загружены до '' streamer.so
Reply
#8

Глаза мне открыл) Перевел как "крашдетект загрузился до плагина"
Reply
#9

PHP Code:
[22:24:29] [joinJohn_Aizov has joined the server (0:78.111.186.2)
[
22:24:48] [connectionincoming connection78.111.186.2:51286 id1
[22:24:49] [partJohn_Aizov has left the server (0:0
Выдает crashdetecter
Reply
#10

Quote:
Originally Posted by Aizov
View Post
Глаза мне открыл) Перевел как "крашдетект загрузился до плагина"
plugins crashdetect.so streamer.so ...
Reply
#11

Quote:
Originally Posted by S4D
View Post
plugins crashdetect.so streamer.so ...
Я понял уже
Reply
#12

Quote:
Originally Posted by Aizov
View Post
Глаза мне открыл) Перевел как "крашдетект загрузился до плагина"
слова must и should всегда означают будущее время и переводятся как обязан (аксиома, других вариантов нет) и должен (если очень хочется то нет) соответственно.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)