[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
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;
}
[22:38:08] [join] Yest_Testo has joined the server (14:127.0.0.1)
[22:38:08] [debug] Run time error 4: "Array index out of bounds"
[22:38:08] [debug] Accessing element at index 300 past array upper bound 299
[22:38:08] [debug] AMX backtrace:
[22:38:08] [debug] #0 0001108c in public OnConnectInit (playerid=14) at ../gamemodes/OnConnect.pwn:166
[22:38:08] [debug] #1 00012940 in public Streamer_OnPlayerConnect (playerid=14) at ../gamemodes/OnConnect.pwn:225
[22:38:08] [debug] #2 0000e478 in public SSCANF_OnPlayerConnect (playerid=14) at C:\Users\Serban-PC\Desktop\things\pawno\include\streamer.inc:280
[22:38:08] [debug] #3 00007ca0 in public Itter_OnPlayerConnect (playerid=14) at C:\Users\Serban-PC\Desktop\things\pawno\include\sscanf2.inc:205
[22:38:08] [debug] #4 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:38:08] [debug] #5 00007190 in public OnPlayerConnect (playerid=14) at C:\Users\Serban-PC\Desktop\things\pawno\include\Foreach.inc:452
Re-compile with -d3 flag (debug information). You'll get a much more usable stack trace.
|
C:\Users\Serban-PC\Desktop\things\pawno\include\streamer.inc(462) : warning 235: public function lacks forward declaration (symbol "OnPlayerWeaponShot")
../gamemodes/OnGameMode.pwn(11591) : warning 204: symbol is assigned a value that is never used: "amount"
../gamemodes/OnCommand.pwn(24145) : warning 204: symbol is assigned a value that is never used: "devtext"
../gamemodes/OnCommand.pwn(24145) : warning 204: symbol is assigned a value that is never used: "sendername"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 22568 bytes
Code size: 4540644 bytes
Data size: 19202652 bytes
Stack/heap size: 262144 bytes; estimated max. usage: unknown, due to recursion
Total requirements:24028008 bytes
4 Warnings.
public OnConnectInit(playerid)
{
RemovePlayerAttachedObject(playerid,0), RemovePlayerAttachedObject(playerid,1);
RemovePlayerAttachedObject(playerid,2), RemovePlayerAttachedObject(playerid,3);
RemovePlayerAttachedObject(playerid,4), RemovePlayerAttachedObject(playerid,5);
RemovePlayerAttachedObject(playerid,6), RemovePlayerAttachedObject(playerid,7);
RemovePlayerAttachedObject(playerid,8), RemovePlayerAttachedObject(playerid,9);
SetPVarInt(playerid, "Cash", 0);
SetPVarInt(playerid, "Bank", 0);
SetPVarInt(playerid, "RentKey", 2005);
SetPVarInt(playerid, "HouseKey", 1000);
SetPVarInt(playerid, "BizzKey", 1000);
SetPVarInt(playerid, "HouseEnter", 1000);
SetPVarInt(playerid, "BizzEnter", 1000);
SetPVarInt(playerid, "IntEnter", 1000);
SetPVarInt(playerid, "CarKey1", SCRIPT_CARS);
SetPVarInt(playerid, "CarKey2", SCRIPT_CARS);
SetPVarInt(playerid, "CarKey3", SCRIPT_CARS);
PlayerInfo[playerid][pSpeedDelay]=0;
PlayerInfo[playerid][pWeapon][0] = 0;
PlayerInfo[playerid][pWeapon][1] = 0;
PlayerInfo[playerid][pWeapon][2] = 0;
PlayerInfo[playerid][pWeapon][3] = 0;
PlayerInfo[playerid][pWeapon][4] = 0;
PlayerInfo[playerid][pWeapon][5] = 0;
PlayerInfo[playerid][pWeapon][6] = 0;
PlayerInfo[playerid][pWeapon][7] = 0;
PlayerInfo[playerid][pWeapon][8] = 0;
PlayerInfo[playerid][pWeapon][9] = 0;
PlayerInfo[playerid][pWeapon][10] = 0;
PlayerInfo[playerid][pWeapon][11] = 0;
PlayerInfo[playerid][pWeapon][12] = 0;
PlayerInfo[playerid][pAmmo][0] = 0;
PlayerInfo[playerid][pAmmo][1] = 0;
PlayerInfo[playerid][pAmmo][2] = 0;
PlayerInfo[playerid][pAmmo][3] = 0;
PlayerInfo[playerid][pAmmo][4] = 0;
PlayerInfo[playerid][pAmmo][5] = 0;
PlayerInfo[playerid][pAmmo][6] = 0;
PlayerInfo[playerid][pAmmo][7] = 0;
PlayerInfo[playerid][pAmmo][8] = 0;
PlayerInfo[playerid][pAmmo][9] = 0;
PlayerInfo[playerid][pAmmo][10] = 0;
PlayerInfo[playerid][pAmmo][11] = 0;
PlayerInfo[playerid][pAmmo][12] = 0;
SetPVarInt(playerid, "HouseEnter", 1000);
SetPVarInt(playerid, "BizzEnter", 1000);
SetPVarInt(playerid, "Checkpoint", CHECKPOINT_NONE);
SetPVarInt(playerid, "Bot", 501);
new randmask = 1000 + random(9999999);
SetPVarInt(playerid, "MaskID", randmask);
SetPVarInt(playerid, "Mobile", 501);
new randphone = 1000 + random(9999999);
SetPVarInt(playerid, "PhoneNum", randphone);
SetPVarInt(playerid, "RefillOffer", 501);
SetPVarInt(playerid, "RepairOffer", 501);
SetPVarInt(playerid, "Drag", 501);
for(new i = 0; i < 301; i++) { PlayerInfo[playerid][pBlockPM][i] = 0; }
SetPVarInt(playerid, "ShakeOffer", 501);
SetPVarInt(playerid, "DragOffer", 501);
SetPVarInt(playerid, "TrunkOffer", 501);
SetPVarInt(playerid, "LiveOffer", 501);
SetPVarInt(playerid, "InviteOffer", 501);
SetPVarInt(playerid, "VehicleOffer", 501);
SetPVarInt(playerid, "BlindOffer", 501);
SetPVarInt(playerid, "HouseOffer", 501);
strmid(PlayerInfo[playerid][pAdmName], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pAccent], "None", 0, strlen("None"), 255);
for(new i = 0; i < 5; i++)
{
PlayerInfo[playerid][pTicket][i] = 0;
strmid(TicketReason[playerid][i], "None", 0, strlen("None"), 255);
}
strmid(PlayerInfo[playerid][pPMMsg], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pTaunt], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pNote1], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pNote2], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pNote3], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pNote4], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pNote5], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pJailReason], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pWarning], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pOOC], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pMetagame], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pRevenge], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pRoleplay], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pPowergame], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pQuest1], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pQuest2], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pQuest3], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pQuest4], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pQuest5], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pWarrant], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pCellname], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pLiveOffer][0]=0;
PlayerInfo[playerid][pLiveOffer][1]=0;
PlayerInfo[playerid][pJobTime]=0;
ResetPlayerWeaponsEx(playerid);
SetPVarInt(playerid, "CameraPos", 6);
SetPVarInt(playerid, "CameraDelay", 1);
TextDrawHideForPlayer(playerid, FadeDraw[playerid]);
TextDrawHideForPlayer(playerid, HitMark);
TextDrawHideForPlayer(playerid, ScreenBar1);
TextDrawHideForPlayer(playerid, ScreenBar2);
StopAudioStreamForPlayerEx(playerid);
return 1;
}
for(new i = 0; i < 301; i++) { PlayerInfo[playerid][pBlockPM][i] = 0; }
for(new i = 0; i < 300; i++) { PlayerInfo[playerid][pBlockPM][i] = 0; }
Change to:
pawn Код:
|