Server restarting.
#1

Hello, I have a quite annoying problem. Whenever I do /enter in my prison, the server is shutting down. Any ideeas why? I'm using 0.3c. The same thing happens when I do /enter in few businesses. Thank you.
Reply
#2

There's some bug/error in your code.
Reply
#3

And it suddenly appeared? Few weeks ago I didn't had that problem and I barely changed something.
Reply
#4

Can you show me your code?
Only one /enter command where you have that crash.
Reply
#5

Well, it's kinda complicated, the coordonates are in a txt file in Scriptfiles folder. That's the line:


1772.5704,-1548.4906,9.9133,1508.3622,-1700.8057,2622.3782,~b~Prison Indoor,0,20,0,0,0,0,0
1797.9349,-1578.8494,14.0907,1548.5311,-1707.5896,2628.7197,~b~Los Santos Prison,0,20,5,1,30,0,0


Entrancex
Entrancey
Entrancez
Exitx
Exity
Exitz
Description
World
Interior
Type
Icon
IconT
Pick
PickT

EDIT: That's the code for what am I using for /enter.

pawn Код:
for(new i = 0; i < sizeof(IntInfo); i++)
        {
            if (PlayerToPoint(3, playerid,IntInfo[i][iEntrancex], IntInfo[i][iEntrancey], IntInfo[i][iEntrancez]))
            {
                if(IntInfo[i][iType] == 5)
                {
                    if(PlayerInfo[playerid][pMember] >= 0)
                    {
                        GameTextForPlayer(playerid, "~w~type /exit~n~to get out", 5000, 3);
                        SetPlayerInterior(playerid,IntInfo[i][iInt]);
                        SetPlayerVirtualWorld(playerid,IntInfo[i][iWorld]);
                        Pause(playerid);
                        SetPlayerPos(playerid,IntInfo[i][iExitx], IntInfo[i][iExity], IntInfo[i][iExitz]);
                        IntEntered[playerid] = i;
                        return 1;
                    }
                }
                GameTextForPlayer(playerid, "~w~type /exit~n~to get out", 5000, 3);
                SetPlayerInterior(playerid,IntInfo[i][iInt]);
                SetPlayerVirtualWorld(playerid,IntInfo[i][iWorld]);
                Pause(playerid);
                SetPlayerPos(playerid,IntInfo[i][iExitx], IntInfo[i][iExity], IntInfo[i][iExitz]);
                IntEntered[playerid] = i;
                if(IntInfo[i][iType] == 1)
                {
                    SetPlayerShopName(playerid,"FDBURG");
                }
                else if(IntInfo[i][iType] == 2)
                {
                    SetPlayerShopName(playerid,"FDPIZA");
                }
                else if(IntInfo[i][iType] == 3)
                {
                    SetPlayerShopName(playerid,"FDCHICK");
                }
                else if(IntInfo[i][iType] == 4)
                {
                    SendClientMessage(playerid,COLOR_GRAD4,"Type /skin to change your clothes.");
                }
            }
        }
Reply
#6

Anyone?
Reply
#7

Pause(playerid);

Whats this? Could you show the public/stock
Reply
#8

I don't see nothing that can make server restart/crash but btw see in the server console why ot restart, see server logs too then you can see if it crash when you do /enter!
Reply
#9

Quote:
Originally Posted by Johndaonee
Посмотреть сообщение
Pause(playerid);

Whats this? Could you show the public/stock
That's just an include which freezes the player when he entres an interior so the objects will fully load.

https://sampforum.blast.hk/showthread.php?tid=191112



Quote:
Originally Posted by ricardo178
Посмотреть сообщение
I don't see nothing that can make server restart/crash but btw see in the server console why ot restart, see server logs too then you can see if it crash when you do /enter!

Код:
--------------------------

SA-MP Server: 0.3c



Exception At Address: 0x7C812AEB



Registers:

EAX: 0x0012FB60	EBX: 0x00000000	ECX: 0x00000000	EDX: 0x00000002

ESI: 0x0012FBE8	EDI: 0x03135560	EBP: 0x0012FBB0	ESP: 0x0012FB5C

EFLAGS: 0x00000206



Stack:

+0000: 0x031354E0   0xE06D7363   0x00000001   0x00000000

+0010: 0x7C812AEB   0x00000003   0x19930520   0x0012FC18

+0020: 0x00BA6B88   0x03136538   0x0000001F   0x00BC5848

+0030: 0x0000001A   0x0012FBB0   0x784859BE   0x03136538

+0040: 0x0000001F   0x00BC5848   0x0000001A   0x0000001F

+0050: 0x0000001F   0x0012FBE8   0x7857DBF9   0xE06D7363

+0060: 0x00000001   0x00000003   0x0012FBDC   0xE06D7363

+0070: 0x00000001   0x00000000   0x00000000   0x00000003

+0080: 0x19930520   0x0012FC18   0x00BA6B88   0x0012FC50

+0090: 0x00B8FD17   0x0012FC18   0x00BA6B88   0xFFFFFFFF

+00A0: 0x7C9101BB   0x00BC5848   0x00BC0000   0x00000000

+00B0: 0x00000018   0x0000001A   0x0000001F   0x00BA51FC

+00C0: 0x00000000   0x00000000   0x00000018   0x03136538

+00D0: 0x00000004   0x0012FB8C   0x031360C8   0x0000001A

+00E0: 0x0000001F   0x7C910040   0x0012FCF8   0x00BA3832

+00F0: 0x00000000   0x031360C8   0x00B9BD2D   0x00000000

+0100: 0x031360C8   0x031362C8   0x031362E8   0x030FED10

+0110: 0x03135598   0x7F800000   0x785838BB   0x03138878

+0120: 0x00000000   0x031362D0   0x00000000   0x030FED10

+0130: 0x03135598   0x0313630C   0x03137E40   0x00000000
+ Nothing wrong in the server_log file.
Reply
#10

Debug each line with "print()" or "printf()" functions. See what is the last line that the console prints and then you will find out you bugged code line.
If you still not able to fix it by yourself, post the bugged line here and we will take a look.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)