[URGENT-HELP!]Server Crashing after 5-10 mins,
#1

hiii,
Server is crashing, i have problem with some things strange errors, i m noob in scripting, so help me like brother :P
my server is crashing after 5 mins,
a talk to my host owner, they said there is nothing problem in server, problm is in my script,
Please help me, m getting this kind of error

Quote:

[09:42:47] [debug] Run time error 4: "Array index out of bounds"
[09:42:47] [debug] Accessing element at index 65535 past array upper bound 499
[09:42:47] [debug] AMX backtrace:
[09:42:47] [debug] #0 0005ec8c in public OnPlayerTakeDamage (0x00000004, 0x0000ffff, 0x409e6667, 0x00000036) from COD.amx
[09:42:49] [debug] Run time error 4: "Array index out of bounds"
[09:42:49] [debug] Accessing element at index 65535 past array upper bound 499
[09:42:49] [debug] AMX backtrace:
[09:42:49] [debug] #0 0005ec8c in public OnPlayerTakeDamage (0x00000012, 0x0000ffff, 0x419782dc, 0x00000036) from COD.amx
[09:42:53] Incoming connection: 36.68.148.235:22355
[09:42:54] [join] Commander has joined the server (24:36.68.148.235)
[09:42:54] [part] Commander has left the server (24:2)
[09:43:08] [debug] Run time error 4: "Array index out of bounds"
[09:43:08] [debug] Accessing element at index 65535 past array upper bound 499
[09:43:08] [debug] AMX backtrace:
[09:43:08] [debug] #0 0005ec8c in public OnPlayerTakeDamage (0x0000000a, 0x0000ffff, 0x41bf58ef, 0x00000036) from COD.amx

Reply
#2

any body here? who can help me??
Reply
#3

Something wrong with the public OnPlayerTakeDamage in your script?
Reply
#4

i dont know no one hlping me
Reply
#5

Does The Script Compile Correctly without any errors?
Reply
#6

yes, all was fine from 3 months, just 2 days its crashing, i tried on other host same result, is that is due to i need to update "'samp03svr' replace to host file manager?
Reply
#7

Post your OnPlayerTakeDamage please
You are passing functions with INVALID_PLAYER_ID
Reply
#8

it was alright from 3 month, just facing that problem from 2 days, compiled and no error, is that due to samp update came??

Quote:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
// anti-team-attack
if(gTeam[issuerid] == TEAM_USA && gTeam[playerid] == TEAM_USA && EDM[playerid] == 0)
{
GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
}
if(gTeam[issuerid] == TEAM_EURASIA && gTeam[playerid] == TEAM_EURASIA && EDM[playerid] == 0)
{
GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
}
if(gTeam[issuerid] == TEAM_ARAB && gTeam[playerid] == TEAM_ARAB && EDM[playerid] == 0)
{
GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
}
if(gTeam[issuerid] == TEAM_SOVIET && gTeam[playerid] == TEAM_SOVIET && EDM[playerid] == 0)
{
GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
}
if(gTeam[issuerid] == TEAM_AUS && gTeam[playerid] == TEAM_AUS && EDM[playerid] == 0)
{
GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
}
// anti team knifing
if(gTeam[issuerid] == TEAM_USA && gTeam[playerid] == TEAM_USA && weaponid == 4)
{
GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
SetPlayerHealth(issuerid, 0);
}
if(gTeam[issuerid] == TEAM_EURASIA && gTeam[playerid] == TEAM_EURASIA && weaponid == 4)
{
GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
SetPlayerHealth(issuerid, 0);
}
if(gTeam[issuerid] == TEAM_ARAB && gTeam[playerid] == TEAM_ARAB && weaponid == 4)
{
GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
SetPlayerHealth(issuerid, 0);
}
if(gTeam[issuerid] == TEAM_SOVIET && gTeam[playerid] == TEAM_SOVIET && weaponid == 4)
{
GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
SetPlayerHealth(issuerid, 0);
}
if(gTeam[issuerid] == TEAM_AUS && gTeam[playerid] == TEAM_AUS && weaponid == 4)
{
GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
SetPlayerHealth(issuerid, 0);
}

if(issuerid != INVALID_PLAYER_ID)
{
new str[26];
format(str, sizeof(str),"-%.0f", amount);
SetPlayerChatBubble(playerid, str, 0xFF0000FF, 100.0, 2000);
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
}
// admin anti-slap
new Float, Float:y, Float:z;
new Float:gX, Float:gY, Float:gZ;
GetPlayerPos(issuerid, gX, gY, gZ);
if(PlayerInfo[issuerid][OnDuty] == 0 && PlayerInfo[playerid][OnDuty] == 1 && IsPlayerInRangeOfPoint(playerid, 35.5, gX, gY, gZ) && GetPlayerState(issuerid) == PLAYER_STATE_ONFOOT)
{
SetPlayerHealth(playerid, 100000000.0);
GameTextForPlayer(issuerid,"~p~warning!~n~~w~do not attack~n~~w~on duty admins~n~~p~stop that!", 3000, 3);
GetPlayerPos(issuerid,x,y,z); SetPlayerPos(issuerid,x,y,z+13);
}

if(PlayerInfo[playerid][OnDuty] == 1)
{
SetPlayerHealth(playerid, 100000000.0);
}
return 1;
}

Reply
#9

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID || playerid != INVALID_PLAYER_ID)
    {
        // anti-team-attack
        if(gTeam[issuerid] == TEAM_USA && gTeam[playerid] == TEAM_USA && EDM[playerid] == 0)
        {
            GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
        }
        if(gTeam[issuerid] == TEAM_EURASIA && gTeam[playerid] == TEAM_EURASIA && EDM[playerid] == 0)
        {
            GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
        }
        if(gTeam[issuerid] == TEAM_ARAB && gTeam[playerid] == TEAM_ARAB && EDM[playerid] == 0)
        {
            GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
        }
        if(gTeam[issuerid] == TEAM_SOVIET && gTeam[playerid] == TEAM_SOVIET && EDM[playerid] == 0)
        {
            GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
        }
        if(gTeam[issuerid] == TEAM_AUS && gTeam[playerid] == TEAM_AUS && EDM[playerid] == 0)
        {
            GameTextForPlayer(issuerid,"~r~do not team attack!", 3000, 3);
        }
        // anti team knifing
        if(gTeam[issuerid] == TEAM_USA && gTeam[playerid] == TEAM_USA && weaponid == 4)
        {
            GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
            GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
            SetPlayerHealth(issuerid, 0);
        }
        if(gTeam[issuerid] == TEAM_EURASIA && gTeam[playerid] == TEAM_EURASIA && weaponid == 4)
        {
            GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
            GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
            SetPlayerHealth(issuerid, 0);
        }
        if(gTeam[issuerid] == TEAM_ARAB && gTeam[playerid] == TEAM_ARAB && weaponid == 4)
        {
            GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
            GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
            SetPlayerHealth(issuerid, 0);
        }
        if(gTeam[issuerid] == TEAM_SOVIET && gTeam[playerid] == TEAM_SOVIET && weaponid == 4)
        {
            GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
            GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
            SetPlayerHealth(issuerid, 0);
        }
        if(gTeam[issuerid] == TEAM_AUS && gTeam[playerid] == TEAM_AUS && weaponid == 4)
        {
            GameTextForPlayer(issuerid,"~g~do not knife~n~team mates", 3000, 3);
            GameTextForPlayer(playerid,"~g~you got team knifed~n~use /sync", 3000, 3);
            SetPlayerHealth(issuerid, 0);
        }
        new str[26];
        format(str, sizeof(str),"-%.0f", amount);
        SetPlayerChatBubble(playerid, str, 0xFF0000FF, 100.0, 2000);
        PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
        // admin anti-slap
        new Float, Float:y, Float:z;
        new Float:gX, Float:gY, Float:gZ;
        GetPlayerPos(issuerid, gX, gY, gZ);
        if(PlayerInfo[issuerid][OnDuty] == 0 && PlayerInfo[playerid][OnDuty] == 1 && IsPlayerInRangeOfPoint(playerid, 35.5, gX, gY, gZ) && GetPlayerState(issuerid) == PLAYER_STATE_ONFOOT)
        {
            SetPlayerHealth(playerid, 100000000.0);
            GameTextForPlayer(issuerid,"~p~warning!~n~~w~do not attack~n~~w~on duty admins~n~~p~stop that!", 3000, 3);
            GetPlayerPos(issuerid,x,y,z); SetPlayerPos(issuerid,x,y,z+13);
        }
        if(PlayerInfo[playerid][OnDuty] == 1)
        {
            SetPlayerHealth(playerid, 100000000.0);
        }
    }
    return 1;
}
try now
Reply
#10

C:\Users\Mandeep Singh\Desktop\BFW\gamemodes\COD.pwn(5886) : error 017: undefined symbol "x"
C:\Users\Mandeep Singh\Desktop\BFW\gamemodes\COD.pwn(5879) : warning 203: symbol is never used: "Float"

got 2 errors,help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)