Server crashes as soon as somebody register
#1

Hello,

As you can see in the title the server crashes if someone register and or joins the server. The problem is its not giving any error's so i cant find out what the problem is, Maybe you guys know what it is.
Reply
#2

You should install this plugin and reproduce the crash:
https://sampforum.blast.hk/showthread.php?tid=262796
After that post server log.
And if nothing shows up it will be useful if you post your login/register script.
Reply
#3

It just started to spam the whole console with

[13:50:46] [debug] Run time error 4: "Array index out of bounds"
[13:50:46] [debug] Accessing element at index 150 past array upper bound 149
[13:50:46] [debug] AMX backtrace:
[13:50:46] [debug] #0 001f836c in public Checker () from gm.amx

public Checker() :
PHP код:
public Checker(){
    new 
string[256];
    new 
ora,minuti,secondi;
    
gettime(ora,minuti,secondi);
    for(new 
050b++)
    {
        if(
Bomb[b][invehicle]!=0)
        {
            new 
FloatXFloatYFloatZ;
            
GetVehiclePos(Bomb[b][invehicle],X,Y,Z);
            
Bomb[b][bombx]=X;
            
Bomb[b][bomby]=Y;
            
Bomb[b][bombz]=Z;
        }
    }
    for (new 
0<= MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && PLAYERLIST_authed[i])
        {
            
SetPlayerScore(i,PlayerInfo[i][playerlvl]);
            if(
PlayerInfo[i][jail]==&& PlayerInfo[i][jailtime]>2)
            {
                   new 
Float:tmpxFloat:tmpyFloat:tmpz;
                   
GetPlayerPos(i,tmpx,tmpy,tmpz);
                   if(!
IsPlayerInSphere(i,2541.0,-3762.0,25.0,10))
                   {
                       
SetPlayerPos(i,2541.0,-3762.0,25.0);
                       
SetPlayerInterior(i,0);
                       
FreezePlayer(i);
                       
SendClientMessage(i,COLOR_RED,"[JAIL] You must be in jail until the jailtime end!");
                }
                
PlayerInfo[i][jailtime]=PlayerInfo[i][jailtime]-1;
                new 
tmpstr[40];
                
format(tmpstr,40,"~w~Jail left~n~~r~%d",PlayerInfo[i][jailtime]);
                
GameTextForPlayer(i,tmpstr,800,1); //INFO TD
            //    TextDrawSetString(InfoTD[i],tmpstr);
            
}
            if(
PlayerInfo[i][jail]==&& PlayerInfo[i][jailtime]<=3)
            {
                
SendClientMessage(i,COLOR_GREEN,"[JAIL] You are free now, have a nice day and make a good RP");
                
TextDrawHideForPlayer(i,InfoTD[i]);
                
UnJail(i);
            }
        }
        if(
AttemptToLog[i] > 3)
        {
            
format(stringsizeof(string), " %s typed more times a wrong password. Maybe he attempt to hack account!",PlayerName(i));
            
SendAdminMessage(COLOR_GREEN,string);
            
AttemptToLog[i] = 0;
            
SendClientMessage(i,COLOR_ORANGE,"If you lost your password contact a admin ! If you continue typing wrong passwords you may be banned !");
            if(!
IsPlayerNPC(i)) Kick(i);
        }
        new 
Float:armour;
        
GetPlayerArmour(i,armour);
        if(
armour >98 && PlayerTemp[i][ishealing] == 0)
        {
              if(
PlayerInfo[i][power]<10 && !IsPlayerNPC(i))
            {
                
format(stringsizeof(string), " %s was catched with %.0f armour !",PlayerName(i),armour);
                
SendAdminMessage(COLOR_GREEN,string);
                
SendClientMessage(i,COLOR_ORANGE,"You have been detected with cheats !");
                
BanReas("SERVER",i,"Bye Bye Cheater !!!");
                
dUserSet(PlayerName(i)).("bannedby","Server");
                
dUserSet(PlayerName(i)).("bannedbyreason","Armour Hack");
            }
        }
        if(
Traced[i] != -&& TracingX[i] != 99999 && TracingY[i] != 99999 && TracingZ[i] != 99999)
        {
            if(!
IsPlayerInAnyInterior(i))
            {
                
GetPlayerPos(Traced[i],TracingX[i],TracingY[i],TracingZ[i]);
                
SetPlayerCheckpoint(i,TracingX[i],TracingY[i],TracingZ[i],3.0);
            }
        }
      
/*  if(backup[i] != -1 && backupingX[i] != 99999 && backupingY[i] != 99999 && backupingZ[i] != 99999)
        {
            if(!IsPlayerInAnyInterior(i))
            {
                GetPlayerPos(Traced[i],backupingX[i],backupingY[i],backupingZ[i]);
                SetPlayerCheckpoint(i,backupingX[i],backupingY[i],backupingZ[i],3.0);
            }
        }*/
        
if(PlayerTemp[i][examen] == && ExamCP[i] != 0)
        {
            new 
car GetPlayerVehicleID(i);
            if(
GetPlayerState(i) != PLAYER_STATE_DRIVER)
            {
                
ExamCP[i] = 0;
                
SendClientMessage(i,COLOR_ORANGE"You failed the test because you exited the vehicle during test!");
                
DisablePlayerCheckpoint(i);
                
SetVehicleToRespawn(car);
                
PlayerTemp[i][examen] = 0;
            }
        }
        if(
PlayerTemp[i][examen] == && ExamCP[i] != 0)
        {
            new 
carinfo GetPlayerVehicleID(i);
            new 
Float:health;
            
GetVehicleHealth(carinfohealth);
            if(
health 1000.0)
            {
                
PlayerTemp[i][examen] = 0;
                
ExamCP[i] = 0;
                
SendClientMessage(i,COLOR_ORANGE"You failed the test because you damaged the car!");
                
DisablePlayerCheckpoint(i);
                new 
car GetPlayerVehicleID(i);
                
SetVehicleToRespawn(car);
            }
        }
            if(
PlayerTemp[i][examen] == && ExamCP[i] != 0)
        {
                        if(
PlayerTemp[i][speedvalue]>200)
            {
                
PlayerTemp[i][examen] = 0;
                
ExamCP[i] = 0;
                
SendClientMessage(i,COLOR_ORANGE"You failed the test because you exceeded the speed limit off 200 km/h!");
                
DisablePlayerCheckpoint(i);
                new 
car GetPlayerVehicleID(i);
                
SetVehicleToRespawn(car);
            }
        }
        if(
loading[i]> && CollectGuns[i] != 999)
        {
            
loading[i]--;
            new 
lstr[256];
            
format(lstr,sizeof(lstr),"~r~Collecting Gun: ~g~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&& GunsCP[i] < 5)
            {
                
loading[i]=0;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Gunpart ~g~collected succefully! ~n~ ~y~Go to next Location!",3000,3);
            }
            if(
loading[i]<&& GunsCP[i] > 4)
            {
                
loading[i]=0;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Guns ~g~collected succefully! ~n~ ~y~Go and unload them !",3000,3);
            }
        }
        if(
loading[i]>&& CollectBullets[i] != 999)
        {
            
loading[i]--;
            new 
lstr[256];
            
format(lstr,sizeof(lstr),"~r~Collecting Bullets Box: ~g~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&& BulletsCP[i] < 5)
            {
                
loading[i]=0;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Bullets Box ~g~collected succefully! ~n~ ~y~Go to next Location!",3000,3);
            }
            if(
loading[i]<&& BulletsCP[i] > 4)
            {
                
loading[i]=0;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Bullets Boxes ~g~collected succefully! ~n~ ~y~Go and unload them !",3000,3);
            }
        }
        if(
loading[i]>&& CollectDrugs[i] != 999)
        {
            
loading[i]--;
            new 
lstr[256];
            
format(lstr,sizeof(lstr),"~r~Collecting Drugs: ~g~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&& DrugsCP[i] < 5)
            {
                
loading[i]=0;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Drugs ~g~collected succefully! ~n~ ~y~Go to next Location!",3000,3);
            }
            if(
loading[i]<&& DrugsCP[i] > 4)
            {
                
loading[i]=0;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Drugs ~g~collected succefully! ~n~ ~y~Go and unload them !",3000,3);
            }
        }
        if(
loading[i]>&& Unloading[i] != 999)
        {
            
loading[i]--;
            new 
lstr[256];
            
format(lstr,sizeof(lstr),"~r~Unloading: ~y~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&& Unloading[i] == 1)
            {
                
Unloading[i] = 999;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Stuffs succefully unloaded to ~y~deposit!",3000,3);
            }
        }
        if(
loading[i]>&& LoadingX[i] == 1)
        {
            
loading[i]--;
            new 
lstr[256];
            
format(lstr,sizeof(lstr),"~r~Loading from Deposit: ~y~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&& LoadingX[i] == 1)
            {
                  
LoadingX[i] = 999;
                
UnfreezePlayer(i);
                
GameTextForPlayer(i,"~r~Stuffs succefully loaded from ~y~deposit!",3000,3);
            }
        }
        
/*if(JailInTime[i] != 999)
        {
            JailInTime[i]--;
            if(JailInTime[i] < 1)
            {
                Jail2(i,600,666);
                JailInTime[i] = 999;
            }
        }*/
        
if(loading[i]>&& CreatingGun[i] == 1)
        {
            
loading[i]--;
            new 
lstr[256];
            
format(lstr,sizeof(lstr),"~r~Creating Gun: ~y~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&&CreatingGun[i] ==1)
            {
                
UnfreezePlayer(i);
                
CreatingGun[i] = 999;
                
GameTextForPlayer(i,"~r~Gun succefully created !",3000,3);
                
format(lstr,sizeof(lstr),"(( %s )) have a gun in hand.",PlayerName(i));
                
NearMessage(i,lstr,COLOR_LIGHTBLUE);
            }
        }
        if(
loading[i]>&& IsInRobery[i] == 1)
        {
            
loading[i]--;
            new 
lstr[256],nomefile[64];
            new 
robcash,newbizcash;
            new 
stringz[MAX_STRING];
            
format(lstr,sizeof(lstr),"~r~Time Till Rob is Done: ~y~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&& IsInRobery[i] == 1)
            {
                
format(nomefile,sizeof(nomefile),"Businesses/%s.txt",biz[RobbedBiz[i]][bizname]);
                new 
tmpcash dini_Int(nomefile,"bizcash");
                
dini_IntSet(nomefile,"closed",0);
                if(
tmpcash 10000)
                {
                    if(
RobbedBizBy[i]==1)
                    {
                        new 
randomx random(10);
                        if(
randomx <=5)
                        {
                            
GivePlayerMoneyEx(itmpcash/10);
                            
format(stringz,sizeof(stringz),"You succefully robbed %d $ !",tmpcash/10);
                            
SendClientMessage(i,COLOR_LIGHTGREEN,stringz);
                            
RobbedBizBy[i]=-1;
                            
robcash tmpcash/10;
                            
newbizcash tmpcash-robcash;
                            
dini_IntSet(nomefile,"bizcash",newbizcash);
                        }
                        if(
randomx <=&& randomx >5)
                        {
                            
GivePlayerMoneyEx(itmpcash/9);
                            
format(stringz,sizeof(stringz),"You succefully robbed %d $ !",tmpcash/9);
                            
SendClientMessage(i,COLOR_LIGHTGREEN,stringz);
                            
RobbedBizBy[i]=-1;
                            
robcash tmpcash/9;
                            
newbizcash tmpcash-robcash;
                            
dini_IntSet(nomefile,"bizcash",newbizcash);
                        }
                        if(
randomx <=10 && randomx>8)
                        {
                            
GivePlayerMoneyEx(itmpcash/8);
                            
format(stringz,sizeof(stringz),"You succefully robbed %d $ !",tmpcash/8);
                            
SendClientMessage(i,COLOR_LIGHTGREEN,stringz);
                            
RobbedBizBy[i]=-1;
                            
robcash tmpcash/8;
                            
newbizcash tmpcash-robcash;
                            
dini_IntSet(nomefile,"bizcash",newbizcash);
                        }
                        new 
xstri[MAX_STRING];
                        if(!
strlen(dini_Get(nomefile,"name")))
                        {
                            
format(xstri,sizeof(xstri),"-= %s businesses has been robbed! Cops are heading over there!",biz[RobbedBiz[i]][bizname]);
                        }
                        else
                        {
                            
format(xstri,sizeof(xstri),"-= %s businesses has been robbed! Cops are heading over there!",dini_Get(nomefile,"name"));
                        }
                        
SendClientMessageToAll(COLOR_WHITE,"-------------------[ ROBBERY ]--------------------");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN,xstri);
                        new 
xtra[MAX_STRING];
                        
format(xtra,sizeof(xtra),"%s opens the businesses doors !",PlayerName(i));
                        
NearMessage(i,xtra,COLOR_ME);
                    }
                
IsInRobery[i]=0;
                
RobbedBiz[i]=-1;
                
GameTextForPlayer(i,"~r~Robery complete !",3000,3);
                }
                else return 
SendClientMessage(i,COLOR_RED,"Faillll... No money inside business!");
            }
        }
        if(
loading[i]>&& PlayerTemp[i][wforfish] == 1)
        {
            
loading[i]--;
            new 
lstr[256];
            new 
stringa[MAX_STRING];
            
format(lstr,sizeof(lstr),"~g~Waiting ... ~y~%d",loading[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
loading[i]<&& PlayerTemp[i][wforfish] == 1)
            {
                
UnfreezePlayer(i);
                
PlayerTemp[i][wforfish] = 0;
                new 
fishtype random(4);
                new 
fishweight random(140)+40;
                if(
fishtype == 0)
                {
                    
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Shark",PlayerName(i));
                    
NearMessage(i,stringa,COLOR_ME);
                    
format(stringa,sizeof(stringa),"You have caught a Shark, which weights %d Lbs.",fishweight);
                    
SendClientInfo(i,stringa);
                    new 
ffish PlayerTemp[i][myfish];
                    
ffish ffish+fishweight;
                    
PlayerTemp[i][myfish] = ffish;
                    if(
PlayerTemp[i][fishplace] != 3)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                    }
                    if(
PlayerTemp[i][fishplace] == && PlayerTemp[i][myfish] > 1499)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                        
PlayerTemp[i][fishplace] = 2;
                        
DisablePlayerCheckpoint(i);
                        
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
                    }
                }
                if(
fishtype == 1)
                {
                    
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Tuna",PlayerName(i));
                    
NearMessage(i,stringa,COLOR_ME);
                    
format(stringa,sizeof(stringa),"You have caught a Tuna, which weights %d Lbs.",fishweight);
                    
SendClientInfo(i,stringa);
                    new 
ffish PlayerTemp[i][myfish];
                    
ffish ffish+fishweight;
                    
PlayerTemp[i][myfish] = ffish;
                    if(
PlayerTemp[i][fishplace] != 3)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                    }
                    if(
PlayerTemp[i][fishplace] == && PlayerTemp[i][myfish] > 1499)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                        
PlayerTemp[i][fishplace] = 2;
                        
DisablePlayerCheckpoint(i);
                        
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
                    }
                }
                if(
fishtype == 2)
                {
                    
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Swordfish",PlayerName(i));
                    
NearMessage(i,stringa,COLOR_ME);
                    
format(stringa,sizeof(stringa),"You have caught a Swordfish, which weights %d Lbs.",fishweight);
                    
SendClientInfo(i,stringa);
                    new 
ffish PlayerTemp[i][myfish];
                    
ffish ffish+fishweight;
                    
PlayerTemp[i][myfish] = ffish;
                    if(
PlayerTemp[i][fishplace] != 3)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                    }
                    if(
PlayerTemp[i][fishplace] == && PlayerTemp[i][myfish] > 1499)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                        
PlayerTemp[i][fishplace] = 2;
                        
DisablePlayerCheckpoint(i);
                        
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
                    }
                }
                if(
fishtype == 3)
                {
                     
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Murena",PlayerName(i));
                    
NearMessage(i,stringa,COLOR_ME);
                    
format(stringa,sizeof(stringa),"You have caught a Murena, which weights %d Lbs.",fishweight);
                    
SendClientInfo(i,stringa);
                    new 
ffish PlayerTemp[i][myfish];
                    
ffish ffish+fishweight;
                    
PlayerTemp[i][myfish] = ffish;
                    if(
PlayerTemp[i][fishplace] != 3)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                    }
                    if(
PlayerTemp[i][fishplace] == && PlayerTemp[i][myfish] > 1499)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                        
PlayerTemp[i][fishplace] = 2;
                        
DisablePlayerCheckpoint(i);
                        
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
                    }
                }
                if(
fishtype == 4)
                {
                    
SendClientError(i,"You didnt catched nothing!");
                    if(
PlayerTemp[i][fishplace] != 3)
                    {
                        
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
                    }
                }
            }
        }
        if(
JustDied[i]!=0)
        {
            
JustDied[i]--;
        }
        if(
JustDied[i]<1)
        {
            
JustDied[i]=0;
        }
        if(
PlayerTemp[i][quarrystarted] ==1)
        {
            if(
IsPlayerInAnyVehicle(i))
            {
                if(
IsPlayerInSphere(i,808.8862,842.8525,9.9567,20) || IsPlayerInSphere(i,540.4312,727.8328,12.8627,20) || IsPlayerInSphere(i,370.3582,983.9329,30.1614,20))
                {
                    new 
car GetPlayerVehicleID(i);
                    
SetVehicleToRespawn(car);
                    
SendClientMessage(i,COLOR_ORANGE,"You're not allowed to exit the quarry with the quarry cars!");
                }
            }
        }
        if(
HideTD[i]>0)
        {
            
HideTD[i]--;
            if(
HideTD[i]==0)
            {
                
TextDrawHideForPlayer(i,BizTD[i]);
            }
        }
        if(
HideInfo[i]>0)
        {
            
HideInfo[i]--;
            if(
HideInfo[i]==0)
            {
                
TextDrawHideForPlayer(i,InfoTD[i]);
            }
        }
        if(
BuyTicketTime[i] >&& BoughtTicket[i] == && GetPlayerVehicleID(i) == 404)
        {
            
BuyTicketTime[i]--;
        }
        if(
BuyTicketTime[i] <&& BoughtTicket[i] == && GetPlayerVehicleID(i) == 404 && KickedOut[i]==1)
        {
            new 
stringg[MAX_STRING];
            
BuyTicketTime[i] = 0;
            
KickedOut[i]=0;
            
RemovePlayerFromVehicle(i);
            
format(stringg,sizeof(stringg),"Bus Driver kicks out %s because he didnt payed the ticket!",PlayerName(i));
            
NearMessage(i,stringg,COLOR_ME);
            
ShowPlayerDialog(i,68,DIALOG_STYLE_MSGBOX,"Kicked","You have been kicked out of bus!","Fuck You","Nothing");
        }
        if(
BuyTicketTime[i] >&& BoughtTicket2[i] == && GetPlayerVehicleID(i) == 450)
        {
            
BuyTicketTime[i]--;
        }
        if(
BuyTicketTime[i] <&& BoughtTicket2[i] == && GetPlayerVehicleID(i) == 450 && KickedOut[i]==1)
        {
            new 
stringg[MAX_STRING];
            
BuyTicketTime[i] = 0;
            
KickedOut[i]=0;
            
RemoveDriverFromCar(i);
            
format(stringg,sizeof(stringg),"Train Driver kicks out %s because he didnt payed the ticket!",PlayerName(i));
            
NearMessage(i,stringg,COLOR_ME);
            
ShowPlayerDialog(i,68,DIALOG_STYLE_MSGBOX,"Kicked","You have been kicked out of train!","Fuck You","Nothing");
        }
        if(
IsPlayerNPC(i))
        {
            new 
npcname[MAX_PLAYER_NAME];
            
GetPlayerName(inpcnamesizeof(npcname));
               if(!
strcmp(npcname"Bus_Driver"true))
            {
                if(
GetPlayerVehicleID(i) != 404)
                {
                    
PutPlayerInVehicle(i4040);
                }
            }
            if(!
strcmp(npcname"Airplane_Driver"true))
            {
                if(
GetPlayerVehicleID(i) != 405)
                {
                    
PutPlayerInVehicle(i4050);
                }
            }
            if(!
strcmp(npcname"Train_Driver"true))
            {
                if(
GetPlayerVehicleID(i) != 450)
                {
                    
PutPlayerInVehicle(i4500);
                }
            }
        }
        if(
IsTackled[i]==&& FreezeTime[i]!=&& IsKnockouted[i]==0)
        {
            
FreezePlayer(i);
            
FreezeTime[i]--;
            new 
lstr[256];
            
format(lstr,sizeof(lstr),"~r~You can get up in: ~y~%d",FreezeTime[i]);
            
GameTextForPlayer(i,lstr,3000,3);
            if(
IsTackled[i]==&& FreezeTime[i]<1)
            {
                
IsTackled[i]=0;
                
UnfreezePlayer(i);
                
FreezeTime[i]=0;
            }
        }
        if(
IsKnockouted[i] == && FreezeTime[i]!=0)
        {
            
FreezeTime[i]--;
            
IsTackled[i]=0;
            
FreezePlayer(i);
            if(
IsKnockouted[i] == && FreezeTime[i]<1)
            {
                new 
stringg[MAX_STRING];
                
IsKnockouted[i]=0;
                
UnfreezePlayer(i);
                
FreezeTime[i]=0;
                
format(stringg,sizeof(stringg),"%s opens his eyes and feels bad. He doest remember what happened",PlayerName(i));
                
NearMessage(i,stringg,COLOR_ME);
                
SetPlayerDrunkLevel(i5000);
             }
          }
    }
return 
1;

Reply
#4

Show us your public Checker().
Reply
#5

i already changed it as you can see.
Reply
#6

Show me the defined value of MAX_STRING. CTRL + F
Reply
#7

There isn't.
Reply
#8

I know what's the problem but I can not seem to find the line on which it's happening. Is there someone more expirienced than me who can help him?
Problem
somearray[30];
and somewhere in there somearray[31] = 100; which is causing this problem
I assume it's in some loop but I'm not sure.
Reply
#9

I got a problem with register though and this is the backtrace

Код:
[14:29:44] [debug] Server crashed while executing gm.amx
[14:29:44] [debug] AMX backtrace:
[14:29:44] [debug] #0 native fclose () [004056c0] from samp-server.exe
[14:29:44] [debug] #1 0000178c in ?? (0x00797368) from gm.amx
[14:29:44] [debug] #2 00003698 in ?? (0x007937d8, 0x007937b0) from gm.amx
[14:29:44] [debug] #3 00071608 in ?? (0x00000003, 0x007937b0) from gm.amx
[14:29:44] [debug] #4 001ccab0 in public OnDialogResponse (0x00000003, 0x00000000, 0x00000001, 0xffffffff, 0x007937b0) from gm.amx
[14:29:45] [debug] Native backtrace:
[14:29:45] [debug] #0 0049417b in ?? () from samp-server.exe
[14:29:45] [debug] #1 004056cd in ?? () from samp-server.exe
[14:29:45] [debug] #2 648c9cb7 in ?? () from plugins\crashdetect.dll
[14:29:45] [debug] #3 648d543a in ?? () from plugins\crashdetect.dll
[14:29:45] [debug] #4 648d728f in ?? () from plugins\crashdetect.dll
[14:29:45] [debug] #5 648c9d54 in ?? () from plugins\crashdetect.dll
[14:29:45] [debug] #6 648d548a in ?? () from plugins\crashdetect.dll
[14:29:45] [debug] #7 63a949fb in ?? () from plugins\streamer.dll
[14:29:45] [debug] #8 0046de11 in ?? () from samp-server.exe
[14:29:45] [debug] #9 00452970 in ?? () from samp-server.exe
[14:29:45] [debug] #10 0046db90 in ?? () from samp-server.exe
[14:29:45] [debug] #11 00489b92 in ?? () from samp-server.exe
[14:29:45] [debug] #12 00458bcc in ?? () from samp-server.exe
[14:29:45] [debug] #13 0045b39a in ?? () from samp-server.exe
[14:29:45] [debug] #14 76fd1211 in ?? () from C:\Windows\SYSTEM32\KERNELBASE.dll
[14:29:45] [debug] #15 76fd122a in ?? () from C:\Windows\SYSTEM32\KERNELBASE.dll
OnDialogResponse is too big for me to paste into a reaction.
Reply
#10

As it is the register thats giving a problem i found in the OnDialogResponse a register piece of code

PHP код:
if(dialogid == 0//register
    
{
        if(!
response//Reset
        
{
            
ShowPlayerRegisterDialog(playerid);
            return 
0;
        }
        else
        {
            
dcmd_register(playerid,inputtext);
            return 
1;
        } 
dcmd_register:

PHP код:
dcmd_register(playerid,params[])
{
    if (
PLAYERLIST_authed[playerid])
    {
        
SendClientMessage(playerid,COLOR_SYSTEM_GM,"Already authed.");
        return 
1;
    }
    if (
udb_Exists(PlayerName(playerid)))
    {
        
SendClientMessage(playerid,COLOR_SYSTEM_GM,"Account already exists, please use '/login password'.");
        return 
1;
    }
    if (
strlen(params)==0)
    {
         
SendClientMessage(playerid,COLOR_SYSTEM_GM,"You need to fill in a password");
         
ShowPlayerRegisterDialog(playerid);
         return 
1;
    }
    if (!
IsNumeric(params))
    {
        
SendClientMessage(playerid,COLOR_SYSTEM_GM,"Error, the password can contain only numbers");
        
ShowPlayerRegisterDialog(playerid);
         return 
1;
    }
    if (
udb_Create(PlayerName(playerid),params))
    {
        
dUserSetINT(PlayerName(playerid)).("money",10000);
        
dUserSetINT(PlayerName(playerid)).("level",1);
        
dUserSet(PlayerName(playerid)).("family","None");
        
dUserSetINT(PlayerName(playerid)).("ranklvl",-1);
        
dUserSetINT(PlayerName(playerid)).("rpoints",0);
        
dUserSetINT(PlayerName(playerid)).("time",0);
        
dUserSetINT(PlayerName(playerid)).("jail",0);
        
dUserSetINT(PlayerName(playerid)).("jailtime",0);
        
dUserSetINT(PlayerName(playerid)).("banned",0);
        
dUserSetINT(PlayerName(playerid)).("skin",188);
        
dUserSetINT(PlayerName(playerid)).("rentprice",0);
        
dUserSetINT(PlayerName(playerid)).("driverlic",0);
        
dUserSetINT(PlayerName(playerid)).("weaplic",0);
        
dUserSet(PlayerName(playerid)).("job","None");
        
dUserSetINT(PlayerName(playerid)).("jobtime",0);
        
dUserSetINT(PlayerName(playerid)).("jobskill",0);
        
dUserSetINT(PlayerName(playerid)).("totalpayt",0);
        
dUserSetINT(PlayerName(playerid)).("kills",0);
        
dUserSetINT(PlayerName(playerid)).("deaths",0);
        
dUserSetINT(PlayerName(playerid)).("housenum",-1);
        
dUserSetINT(PlayerName(playerid)).("power",0);
        
dUserSetINT(PlayerName(playerid)).("famid",-1);
        
dUserSetINT(PlayerName(playerid)).("sdrugs",0);
        
dUserSetINT(PlayerName(playerid)).("splants",0);
        
dUserSetINT(PlayerName(playerid)).("drugs",0);
        
dUserSetINT(PlayerName(playerid)).("sguns",0);
        
dUserSetINT(PlayerName(playerid)).("cigarettes",0);
        
dUserSetINT(PlayerName(playerid)).("guns",0);
        
dUserSetINT(PlayerName(playerid)).("money_bank",0);
        
dUserSetINT(PlayerName(playerid)).("loan",0);
        
dUserSetINT(PlayerName(playerid)).("nreports",0);
        
dUserSetINT(PlayerName(playerid)).("flylic",0);
        
dUserSetINT(PlayerName(playerid)).("boatlic",0);
        
dUserSetINT(PlayerName(playerid)).("head",0);
        
dUserSetINT(PlayerName(playerid)).("female",0);
        
dUserSetINT(PlayerName(playerid)).("bail",0);
        
dUserSetINT(PlayerName(playerid)).("gps",0);
        
dUserSetINT(PlayerName(playerid)).("phonenumber",0);
        
dUserSetINT(PlayerName(playerid)).("gotphone"0);
        
dUserSetINT(PlayerName(playerid)).("phonebook",0);
        
dUserSetFLOAT(PlayerName(playerid)).("spawnX",0);
        
dUserSetFLOAT(PlayerName(playerid)).("spawnY"0);
        
dUserSetFLOAT(PlayerName(playerid)).("spawnZ",0);
        
dUserSetINT(PlayerName(playerid)).("spawnInter",0);
        
dUserSetINT(PlayerName(playerid)).("factnumber",-1);
        
dUserSet(PlayerName(playerid)).("faction","None");
        
dUserSetINT(PlayerName(playerid)).("laptop",0);
        
dUserSetINT(PlayerName(playerid)).("virworld",0);
        
dUserSetINT(PlayerName(playerid)).("age",25);
        
dUserSet(PlayerName(playerid)).("city","LasVenturas");
        
dUserSet(PlayerName(playerid)).("married","NoOne");
        
dUserSetINT(PlayerName(playerid)).("barrierkeys",0);
        
dUserSetINT(PlayerName(playerid)).("radio",0);
        
dUserSetINT(PlayerName(playerid)).("freq",0);
        
dUserSetINT(PlayerName(playerid)).("btime",0);
        
dUserSetINT(PlayerName(playerid)).("tutorial",1);
        
dUserSet(PlayerName(playerid)).("teamname","Civilian");
        
dUserSetINT(PlayerName(playerid)).("playerteam",CIV);
        
dUserSetINT(PlayerName(playerid)).("pizzas",0);
        
dUserSetINT(PlayerName(playerid)).("fightskill",0);
        
dUserSetINT(PlayerName(playerid)).("fights",0);
        
dUserSetINT(PlayerName(playerid)).("mycar",-1);
        new 
datestring[MAX_STRING],year,month,day;
        
getdate(year,month,day);
        
format(datestring,sizeof(datestring),"%d/%d/%d",day,month,year);
        
dUserSet(PlayerName(playerid)).("date",datestring);
        
dUserSet(PlayerName(playerid)).("bannedby","None");
        
dUserSet(PlayerName(playerid)).("bannedbyreason","None");
        
dUserSetINT(PlayerName(playerid)).("bulets",0);
        
dUserSetINT(PlayerName(playerid)).("extracar",0);
        
dUserSetINT(PlayerName(playerid)).("canhavecars",0);
        
dUserSetINT(PlayerName(playerid)).("walkstyle",WALK_NORMAL);
        
dUserSet(PlayerName(playerid)).("accent","None");
        
dUserSet(PlayerName(playerid)).("jailedby","None");
        
dUserSet(PlayerName(playerid)).("jailedbyreason","None");
        
dUserSetINT(PlayerName(playerid)).("helper",0);
        
dUserSetINT(PlayerName(playerid)).("payche",0);
        
dUserSet(PlayerName(playerid)).("pmodel","None");
        
printf("%s's Account created.",PlayerName(playerid));
        
SendClientMessage(playerid,COLOR_SYSTEM_GM,"..: Account successfully created. Please login now.");
        
ShowPlayerLoginDialog(playerid);
        return 
1;
    }
    return 
true;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)