Plugin encountered error 15: Array index is out of bounds

L 11/05/2011 - 22:50:57: [SM] Plugin encountered error 15: Array index is out of bounds

L 11/05/2011 - 22:50:57: [SM] Displaying call stack trace for plugin "fill.smx":

L 11/05/2011 - 22:50:57: [SM] [0] Line 893, I:\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\fill. sp::CEOP2()




PHP Code:







new Handle:TCheckExp[MAXPLAYERS+1] = INVALID_HANDLE
HookEvent
("player_first_spawn"PFS)

public 
Action:PFS(Handle:eventString:event_name[], bool:dontBroadcast)
{
    
TCheckExp[client] = CreateTimer(1.0TimerCheckExpclient)
}
public 
Action:TimerCheckExp
(Handle:timerany:targetid)
{
    
TimerCheckExp_MAINS(targetid)
}
TimerCheckExp_MAINS(targetid)
{
    if (!
IsClientInGame(targetid))
        return;
    
decl String:SteamId[MAX_LINE_WIDTH];
    
GetClientAuthString(targetidSteamIdsizeof(SteamId));
    
decl String:query[1024];
    
Format(querysizeof(query), "SELECT name, Basic_Level, Endurance, Str, EXP, Agi, Health,StatusPoint FROM players WHERE steam_id = '%s'"SteamId);
    
SQL_TQuery(DatabaseCEOP2querytargetid);
}
public 
CEOP2(Handle:ownerHandle:hndl, const String: error[], any:data)
{
    new 
client data;
    if (!
client)
        return;
    if (!
IsClientInGame(client))
        return;
    
/*if (!client || hndl == INVALID_HANDLE)
        return;*/
    //new String:Name[32];
    
new LvSEXPS;
    while (
SQL_FetchRow(hn dl))
    {
        
//SQL_FetchString(hndl, 0, Name, sizeof(Name));
        
LvS SQL_FetchInt(hndl1);
        
EXPS SQL_FetchInt(hndl4);
    }
    
decl String:SteamId[MAX_LINE_WIDTH];
    
GetClientAuthString(dataSteamIdsizeof(SteamId ));
    
decl String:query[1024];
    if(
EXPS >= GetConVarInt(LvUpExp[LvS+1])) --------------Line 893
    
{
        if(
IsClientInGame(client), LvS <= 30)
        {
            
Format(querysizeof(query), "UPDATE players&nbs p;SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'"GetConVarInt(LvUpSP), SteamId);
            
SQL_TQuery(DatabaseT_Genericquery);
        }
        else
        if(
IsClientInGame(client), LvS >= 31 && LvS <= 60)
        {
       ;      
Format(querysizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'"GetConVarInt(LvUpSP3160), SteamId);
            
SQL_TQuery(DatabaseT_Genericquery);
        }
        else
        if(
IsClientInGame(client), LvS >=  61 && LvS <= 90)
        {
            
Format(querysizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'"GetConVarInt(LvUpSP6190), SteamId);
            
SQL_TQuery(DatabaseT_Genericquery);
        }
  &nb sp;     else
        if(
IsClientInGame(client), LvS >= 91 && LvS <= 100)
        {
            
Format(querysizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'"GetConVarInt(LvUpSP91100), SteamId);
            
SQL_TQuery(DatabaseT_Genericquery);
        }
        else
        if(
IsClientInGame(client), LvS >= 101)
        {
            
Format(querysizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'"GetConVarInt(LvUpSP101150), SteamId);
            
SQL_TQuery(DatabaseT_Genericquery);
        }    
        
FakeClientCommand(client"LvUpMsg1")//LvUpMsg1_MAIN
        
Format(querysizeof(query), "UPDATE players SET EXP = 0, Basic_Level = Basic_Level + 1 WHERE steam_id = '%s'"SteamId);
   ;      
SQL_TQuery(DatabaseT_Genericquery);
        
CreateTimer(1.0TimerCheckExpclient)
    }












Orignal From: Plugin encountered error 15: Array index is out of bounds

No comments

Not a single link is allowed to submit in comment :o