Jump to content
  • 0

[Crash] Create account


serbansubs

Question

Problema: De fiecare data cand doresc sa creez un cont nou,dupa introducerea parolei primesc urmatoarea eroare (video). Tin sa mentionez ca eroarea este de la introducerea 0.3Z

Erori / warnings:"Server Close connection" Server log

[pawn]13:32:45] Incoming connection: 127.0.0.1:49160

[13:32:46] [join] Yest_Tes has joined the server (10:127.0.0.1)

[13:32:46] [debug] Run time error 4: "Array index out of bounds"

[13:32:46] [debug]  Accessing element at index 300 past array upper bound 299

[13:32:46] [debug] AMX backtrace:

[13:32:46] [debug] #0 0000de88 in ?? () from PR-RP.amx

[13:32:46] [debug] #1 0000f200 in ?? () from PR-RP.amx

[13:32:46] [debug] #2 0000bcd0 in ?? () from PR-RP.amx

[13:32:46] [debug] #3 0000618c in public Itter_OnPlayerConnect () from PR-RP.amx

[13:32:46] [debug] #4 native CallLocalFunction () [00472ad0] from samp-server.exe

[13:32:46] [debug] #5 00005870 in public OnPlayerConnect () from PR-RP.amx

[/pawn]

Lini/script:

public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
    new string[128], user[128], day, month, year, hour, minute, second;
    new num = GetMaxIPs(playerid);
    if(num >= 2 && !IsPlayerNPC(playerid)) return Kick(playerid);
    OnConnectInit(playerid);
    //furn system
    gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;

    for(new x=0; x < SELECTION_ITEMS; x++) {
        gSelectionFurns[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
	}

	gFurnAt[playerid] = 0;
    if(!NameIsRP(PlayerName(playerid)))
	{
		SendClientMessage(playerid, COLOR_LIGHTRED, "Your name is not acceptable please use the format: Firstname_Lastname.");
		KickEx(playerid);
		return 1;
	}
	GetPlayerHost(playerid); // Gets the DNS Data
	SetPlayerColor(playerid,COLOR_GREY);
	format(string, sizeof(string),"%s (%d) connected to the server.", PlayerName(playerid), playerid);
	if(GetPVarInt(playerid, "Admin") > 0 || GetPVarInt(playerid, "Helper") > 0 || GetPVarInt(playerid, "RegTeam") > 0)
	{
		LoginLog(string);
	}
	foreach (Player,i)
	{
	    if(GetPVarInt(i, "CntNames") == 1)
	    {
	        SendClientMessage(i,COLOR_WHITE,string);
	    }
	}
	ResetPlayerWeapons(playerid);
	CheckIP(playerid);
	gettime(hour,minute,second), FixHour(hour), hour = shifthour, getdate(year,month,day);
    format(user, sizeof(user), "users/%s.ini", PlayerName(playerid));
	if(DOF2_FileExists(user) && DOF2_GetInt(user, "Banned") == 1)
	{
        if(DOF2_GetInt(user, "TempYear") > 0 && DOF2_GetInt(user, "TempMonth") > 0 && DOF2_GetInt(user, "TempDay") > 0)
        {
		    new proceed = 0;
		    if(year > DOF2_GetInt(user, "TempYear")) // If the year is over your tempban year.
	        {
		        DOF2_SetInt(user, "Banned", 0);
	    	    DOF2_SetInt(user, "TempYear", 0);
		        DOF2_SetInt(user, "TempMonth", 0);
		        DOF2_SetInt(user, "TempDay", 0);
		        DOF2_WriteFile();
		        format(string, sizeof(string),"unbanip %s", DOF2_GetString(user, "IP"));
		        SendRconCommand(string);
		        SendRconCommand("reloadbans");
		        format(string, sizeof(string),"AdmWarn: %s was un-temp banned from Project-Bot.", PlayerName(playerid));
		        SendAdminMessage(COLOR_YELLOW,string);
		        proceed=1;
		    }
		    if(month > DOF2_GetInt(user, "TempMonth")) // If the month is over your tempban month.
		    {
		        DOF2_SetInt(user, "Banned", 0);
		        DOF2_SetInt(user, "TempYear", 0);
		        DOF2_SetInt(user, "TempMonth", 0);
		        DOF2_SetInt(user, "TempDay", 0);
		        DOF2_WriteFile();
		        format(string, sizeof(string),"unbanip %s", DOF2_GetString(user, "IP"));
		        SendRconCommand(string);
		        SendRconCommand("reloadbans");
		        format(string, sizeof(string),"AdmWarn: %s was un-temp banned from Project-Bot.", PlayerName(playerid));
		        SendAdminMessage(COLOR_YELLOW,string);
		        proceed=1;
		    }
		    if(month >= DOF2_GetInt(user, "TempMonth") && day >= DOF2_GetInt(user, "TempDay")) // If the day is your tempban undue day or above.
		    {
		        DOF2_SetInt(user, "Banned", 0);
		        DOF2_SetInt(user, "TempYear", 0);
		        DOF2_SetInt(user, "TempMonth", 0);
		        DOF2_SetInt(user, "TempDay", 0);
		        DOF2_WriteFile();
		        format(string, sizeof(string),"unbanip %s", DOF2_GetString(user, "IP"));
		        SendRconCommand(string);
		        SendRconCommand("reloadbans");
		        format(string, sizeof(string),"AdmWarn: %s was un-temp banned from Project-Bot.", PlayerName(playerid));
		        SendAdminMessage(COLOR_YELLOW,string);
		        proceed=1;
		    }
		    if(proceed == 0)
		    {
		        new mtext[50];
		        switch(DOF2_GetInt(user, "TempMonth"))
		        {
		            case 1: mtext = "January";
		            case 2: mtext = "February";
		            case 3: mtext = "March";
		            case 4: mtext = "April";
		            case 5: mtext = "May";
		            case 6: mtext = "June";
		            case 7: mtext = "July";
		            case 8: mtext = "August";
		            case 9: mtext = "September";
		            case 10: mtext = "October";
		            case 11: mtext = "November";
	                case 12: mtext = "December";
		        }
		        if(DOF2_GetInt(user, "TempDay") < 10) format(string, sizeof(string),"You are temporarily banned until %s-0%d-%d.", mtext, DOF2_GetInt(user, "TempDay"), DOF2_GetInt(user, "TempYear"));
		        else format(string, sizeof(string),"You are temporarily banned until %s-%d-%d.", mtext, DOF2_GetInt(user, "TempDay"), DOF2_GetInt(user, "TempYear"));
		        SendClientMessage(playerid, COLOR_LIGHTRED, string);
                return Kick(playerid);
            }
        }
	}
	return 1;
}

Ai incercat sa rezolvi singur ?: De obicei imi rezolv singur probleme,am apelat la sa-mp.ro cand nu mai am alte ideei.

Link to comment
Share on other sites

Recommended Posts

[pawn]14:40:26] [debug] Run time error 4: "Array index out of bounds"

[14:40:26] [debug]  Accessing element at index 2856 past array upper bound 499

[14:40:26] [debug] AMX backtrace:

[14:40:26] [debug] #0 002681e0 in public cmd_gateopen (playerid=25, params[]=@0x012506a8 "") at ../gamemodes/OnCommand.pwn:10359

[14:40:26] [debug] #1 native CallLocalFunction () [00472ad0] from samp-server.exe

[14:40:26] [debug] #2 0000ef2c in public OnPlayerCommandText (playerid=25, cmdtext[]=@0x01250680 "/gateopen") at C:\Users\Serban-PC\Desktop\things\pawno\include\zcmd.inc:102

[14:40:39] [debug] Run time error 4: "Array index out of bounds"

[14:40:39] [debug]  Accessing element at index 2856 past array upper bound 499

[14:40:39] [debug] AMX backtrace:

[14:40:39] [debug] #0 002681e0 in public cmd_gateopen (playerid=25, params[]=@0x012506a8 "") at ../gamemodes/OnCommand.pwn:10359

[14:40:39] [debug] #1 native CallLocalFunction () [00472ad0] from samp-server.exe

[14:40:39] [debug] #2 0000ef2c in public OnPlayerCommandText (playerid=25, cmdtext[]=@0x01250680 "/gateopen") at C:\Users\Serban-PC\Desktop\things\pawno\include\zcmd.inc:102

[14:43:00] Incoming connection: 79.119.##3486[/pawn]

Eroarea noua primita in server log :D poate poate.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.