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()
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:event, String:event_name[], bool:dontBroadcast)
{
TCheckExp[client] = CreateTimer(1.0, TimerCheckExp, client)
}
public Action:TimerCheckExp(Handle:timer, any:targetid)
{
TimerCheckExp_MAINS(targetid)
}
TimerCheckExp_MAINS(targetid)
{
if (!IsClientInGame(targetid))
return;
decl String:SteamId[MAX_LINE_WIDTH];
GetClientAuthString(targetid, SteamId, sizeof(SteamId));
decl String:query[1024];
Format(query, sizeof(query), "SELECT name, Basic_Level, Endurance, Str, EXP, Agi, Health,StatusPoint FROM players WHERE steam_id = '%s'", SteamId);
SQL_TQuery(Database, CEOP2, query, targetid);
}
public CEOP2(Handle:owner, Handle: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 LvS, EXPS;
while (SQL_FetchRow(hn dl))
{
//SQL_FetchString(hndl, 0, Name, sizeof(Name));
LvS = SQL_FetchInt(hndl, 1);
EXPS = SQL_FetchInt(hndl, 4);
}
decl String:SteamId[MAX_LINE_WIDTH];
GetClientAuthString(data, SteamId, sizeof(SteamId ));
decl String:query[1024];
if(EXPS >= GetConVarInt(LvUpExp[LvS+1])) --------------Line 893
{
if(IsClientInGame(client), LvS <= 30)
{
Format(query, sizeof(query), "UPDATE players&nbs p;SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'", GetConVarInt(LvUpSP), SteamId);
SQL_TQuery(Database, T_Generic, query);
}
else
if(IsClientInGame(client), LvS >= 31 && LvS <= 60)
{
  ; Format(query, sizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'", GetConVarInt(LvUpSP3160), SteamId);
SQL_TQuery(Database, T_Generic, query);
}
else
if(IsClientInGame(client), LvS >= 61 && LvS <= 90)
{
Format(query, sizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'", GetConVarInt(LvUpSP6190), SteamId);
SQL_TQuery(Database, T_Generic, query);
}
&nb sp; else
if(IsClientInGame(client), LvS >= 91 && LvS <= 100)
{
Format(query, sizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'", GetConVarInt(LvUpSP91100), SteamId);
SQL_TQuery(Database, T_Generic, query);
}
else
if(IsClientInGame(client), LvS >= 101)
{
Format(query, sizeof(query), "UPDATE players SET StatusPoint = StatusPoint + '%i' WHERE steam_id = '%s'", GetConVarInt(LvUpSP101150), SteamId);
SQL_TQuery(Database, T_Generic, query);
}
FakeClientCommand(client, "LvUpMsg1")//LvUpMsg1_MAIN
Format(query, sizeof(query), "UPDATE players SET EXP = 0, Basic_Level = Basic_Level + 1 WHERE steam_id = '%s'", SteamId);
  ; SQL_TQuery(Database, T_Generic, query);
CreateTimer(1.0, TimerCheckExp, client)
}
}
Orignal From: Plugin encountered error 15: Array index is out of bounds
Post a Comment