Raised This Month: $12 Target: $400
 3% 

Plugin Invalid client index 0 pls help :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BulgarPL
Member
Join Date: Dec 2015
Old 12-17-2016 , 09:09   Plugin Invalid client index 0 pls help :(
Reply With Quote #1

Pls help me fix these error logs

Code:
L 12/17/2016 - 09:25:56: [SM] Exception reported: Invalid client index 0
L 12/17/2016 - 09:25:56: [SM] Blaming: skill.sanitarne.smx
L 12/17/2016 - 09:25:56: [SM] Call stack trace:
L 12/17/2016 - 09:25:56: [SM]   [0] IsPlayerAlive
L 12/17/2016 - 09:25:56: [SM]   [1] Line 78, skill.sanitarne.sp::lecz
L 12/17/2016 - 09:26:01: [SM] Exception reported: Invalid client index 0
L 12/17/2016 - 09:26:01: [SM] Blaming: skill.sanitarne.smx
L 12/17/2016 - 09:26:01: [SM] Call stack trace:
L 12/17/2016 - 09:26:01: [SM]   [0] IsPlayerAlive
L 12/17/2016 - 09:26:01: [SM]   [1] Line 78, skill.sanitarne.sp::lecz
L 12/17/2016 - 09:26:06: [SM] Exception reported: Invalid client index 0
L 12/17/2016 - 09:26:06: [SM] Blaming: skill.sanitarne.smx
L 12/17/2016 - 09:26:06: [SM] Call stack trace:
L 12/17/2016 - 09:26:06: [SM]   [0] IsPlayerAlive
L 12/17/2016 - 09:26:06: [SM]   [1] Line 78, skill.sanitarne.sp::lecz
L 12/17/2016 - 09:26:11: [SM] Exception reported: Invalid client index 0
L 12/17/2016 - 09:26:11: [SM] Blaming: skill.sanitarne.smx
L 12/17/2016 - 09:26:11: [SM] Call stack trace:
L 12/17/2016 - 09:26:11: [SM]   [0] IsPlayerAlive
L 12/17/2016 - 09:26:11: [SM]   [1] Line 78, skill.sanitarne.sp::lecz
L 12/17/2016 - 09:26:16: [SM] Exception reported: Invalid client index 0
L 12/17/2016 - 09:26:16: [SM] Blaming: skill.sanitarne.smx

My plugin:
Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <cmod>

public Plugin:myinfo = {
    name = "Cmod Skill: Sanitarne",
    author = "Raflik",
    description = "Skill Sanitarne",
    version = "0.1",
    url = "www"
};

new sanitarneKlasa[MAXPLAYERS+1] = 0;
new sanitarneItem[MAXPLAYERS+1] = 0;
new Handle:timer_klasa[MAXPLAYERS+1] = INVALID_HANDLE;
new Handle:timer_item[MAXPLAYERS+1] = INVALID_HANDLE;


//natywy
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
    //natywy
    CreateNative("Sanitarne", native_sanitarne);
    
    return APLRes_Success;
}

public OnClientConnected(client)
{
    sanitarneKlasa[client] = 0;
    sanitarneItem[client] = 0;
}

public native_sanitarne(Handle:plugin, numParams)
{
    new client = GetNativeCell(1);
    new klasa = GetNativeCell(2);
    new item = GetNativeCell(3);
    
    if(klasa == -1 || item == -1)
    {
        if(klasa == -1)
        {
            if(timer_klasa[client] != INVALID_HANDLE)
            {
                CloseHandle(timer_klasa[client])
                timer_klasa[client] = INVALID_HANDLE;
            }
        }
        if(item == -1)
        {
            if(timer_item[client] != INVALID_HANDLE)
            {
                CloseHandle(timer_item[client])
                timer_item[client] = INVALID_HANDLE;
            }
        }
        return;
    }
    
    if(klasa)
    {
        timer_klasa[client] = CreateTimer(5.0, lecz, client, TIMER_REPEAT);
        sanitarneKlasa[client] = klasa;
    }
    if(item)
    {
        timer_item[client] = CreateTimer(5.0, lecz, client, TIMER_REPEAT);
        sanitarneItem[client] = item;
    }
}

public Action:lecz(Handle:timer, any:client)
{
    new id = client;
    
    if(IsPlayerAlive(id))
    {
        if(sanitarneKlasa[id] || sanitarneItem[id])
        {
            //dodatkowe hp
            new hp = GetClientHealth(id) + sanitarneKlasa[id] + sanitarneItem[id];
            new maxHp = 100 + Cmod_GetClientCON(id)  + Cmod_GetClassCON(id) + Cmod_GetBonusCON(id)
            if(hp > maxHp)
                SetEntData(id, FindDataMapOffs(id, "m_iHealth"), maxHp, 4, true);
            else
                SetEntData(id, FindDataMapOffs(id, "m_iHealth"), hp, 4, true);
        }
        else
        {
            if(timer_klasa[client] != INVALID_HANDLE)
{
                CloseHandle(timer_klasa[client])
                timer_klasa[client] = INVALID_HANDLE;
            }
            if(timer_item[client] != INVALID_HANDLE)
            {
                CloseHandle(timer_item[client])
                timer_item[client] = INVALID_HANDLE;
            }
        }
    }
    return Plugin_Continue;
    
}

stock bool:IsValid(client)
{
    if ( !( 1 <= client <= MaxClients ) || !IsClientInGame(client) ) 
        return false; 
     
    return true;
BulgarPL is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 12-17-2016 , 09:19   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #2

PHP Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <cmod>

public Plugin myinfo = {
    
name "Cmod Skill: Sanitarne",
    
author "Raflik",
    
description "Skill Sanitarne",
    
version "0.1",
    
url "www"
};

int sanitarneKlasa[MAXPLAYERS+1] = 0;
int sanitarneItem[MAXPLAYERS+1] = 0;
Handle timer_klasa[MAXPLAYERS+1] = null;
Handle timer_item[MAXPLAYERS+1] = null;

//natywy
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
//natywy
    
CreateNative("Sanitarne"native_sanitarne);
    
    return 
APLRes_Success;
}

public 
void OnClientConnected(int client)
{
    
sanitarneKlasa[client] = 0;
    
sanitarneItem[client] = 0;
}

//public native_sanitarne(Handle:plugin, numParams)
public int native_sanitarne(Handle pluginint numParams)
{
    
int client GetNativeCell(1);
    
int klasa GetNativeCell(2);
    
int item GetNativeCell(3);
    
    if(
klasa == -|| item == -1)
    {
        if(
klasa == -1)
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client])
                
timer_klasa[client] = null;
            }
        }
        if(
item == -1)
        {
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client])
                
timer_item[client] = null;
            }
        }
        return;
    }
    
    if(
klasa)
    {
        
timer_klasa[client] = CreateTimer(5.0leczclientTIMER_REPEAT);
        
sanitarneKlasa[client] = klasa;
    }
    if(
item)
    {
        
timer_item[client] = CreateTimer(5.0leczclientTIMER_REPEAT);
        
sanitarneItem[client] = item;
    }
}

public 
Action lecz(Handle timerany client)
{
    
int id client;
    if(
IsValidClient(id) && IsPlayerAlive(id))
    {
        if(
sanitarneKlasa[id] || sanitarneItem[id])
        {
            
//dodatkowe hp
            
int hp GetClientHealth(id) + sanitarneKlasa[id] + sanitarneItem[id];
            
int maxHp 100 Cmod_GetClientCON(id) + Cmod_GetClassCON(id) + Cmod_GetBonusCON(id)
            if(
hp maxHp)
                
SetEntData(idFindDataMapOffs(id"m_iHealth"), maxHp4true);
            else
                
SetEntData(idFindDataMapOffs(id"m_iHealth"), hp4true);
        }
        else
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client])
                
timer_klasa[client] = null;
            }
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client])
                
timer_item[client] = null;
            }
        }
    }
    
    return 
Plugin_Continue;
}

stock bool IsValidClient(int client)
{
    return (
<= client <= MaxClients && IsClientInGame(client));

__________________
xines is offline
BulgarPL
Member
Join Date: Dec 2015
Old 12-17-2016 , 09:48   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #3

Quote:
Originally Posted by xines View Post
PHP Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <cmod>

public Plugin myinfo = {
    
name "Cmod Skill: Sanitarne",
    
author "Raflik",
    
description "Skill Sanitarne",
    
version "0.1",
    
url "www"
};

int sanitarneKlasa[MAXPLAYERS+1] = 0;
int sanitarneItem[MAXPLAYERS+1] = 0;
Handle timer_klasa[MAXPLAYERS+1] = null;
Handle timer_item[MAXPLAYERS+1] = null;

//natywy
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
//natywy
    
CreateNative("Sanitarne"native_sanitarne);
    
    return 
APLRes_Success;
}

public 
void OnClientConnected(int client)
{
    
sanitarneKlasa[client] = 0;
    
sanitarneItem[client] = 0;
}

//public native_sanitarne(Handle:plugin, numParams)
public int native_sanitarne(Handle pluginint numParams)
{
    
int client GetNativeCell(1);
    
int klasa GetNativeCell(2);
    
int item GetNativeCell(3);
    
    if(
klasa == -|| item == -1)
    {
        if(
klasa == -1)
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client])
                
timer_klasa[client] = null;
            }
        }
        if(
item == -1)
        {
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client])
                
timer_item[client] = null;
            }
        }
        return;
    }
    
    if(
klasa)
    {
        
timer_klasa[client] = CreateTimer(5.0leczclientTIMER_REPEAT);
        
sanitarneKlasa[client] = klasa;
    }
    if(
item)
    {
        
timer_item[client] = CreateTimer(5.0leczclientTIMER_REPEAT);
        
sanitarneItem[client] = item;
    }
}

public 
Action lecz(Handle timerany client)
{
    
int id client;
    if(
IsValidClient(id) && IsPlayerAlive(id))
    {
        if(
sanitarneKlasa[id] || sanitarneItem[id])
        {
            
//dodatkowe hp
            
int hp GetClientHealth(id) + sanitarneKlasa[id] + sanitarneItem[id];
            
int maxHp 100 Cmod_GetClientCON(id) + Cmod_GetClassCON(id) + Cmod_GetBonusCON(id)
            if(
hp maxHp)
                
SetEntData(idFindDataMapOffs(id"m_iHealth"), maxHp4true);
            else
                
SetEntData(idFindDataMapOffs(id"m_iHealth"), hp4true);
        }
        else
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client])
                
timer_klasa[client] = null;
            }
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client])
                
timer_item[client] = null;
            }
        }
    }
    
    return 
Plugin_Continue;
}

stock bool IsValidClient(int client)
{
    return (
<= client <= MaxClients && IsClientInGame(client));


I cant compile that. To much errors.
BulgarPL is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 12-17-2016 , 09:59   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #4

Quote:
Originally Posted by BulgarPL View Post
I cant compile that. To much errors.
Show me the errors, also i don't have this so called cmod.
__________________
xines is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-17-2016 , 10:01   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #5

Never pass a client index through an asynchronous callback. Use the userid instead.
__________________
Peace-Maker is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 12-17-2016 , 10:08   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #6

Quote:
Originally Posted by Peace-Maker View Post
Never pass a client index through an asynchronous callback. Use the userid instead.
Explain to me why wiki tells me something different when using handles:
https://wiki.alliedmods.net/Timers_(...#Simple_Values
__________________
xines is offline
BulgarPL
Member
Join Date: Dec 2015
Old 12-17-2016 , 10:08   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #7

Quote:
Originally Posted by xines View Post
Show me the errors, also i don't have this so called cmod.

Code:
//// 123.sp
//
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
lients.inc(373) : warning 219: local variable "client" shadows a variable at a p
receding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\u
sermessages.inc(250) : warning 219: local variable "client" shadows a variable a
t a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
alflife.inc(604) : warning 219: local variable "client" shadows a variable at a
preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
alflife.inc(625) : warning 219: local variable "client" shadows a variable at a
preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
ommandfilters.inc(96) : warning 219: local variable "client" shadows a variable
at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
elpers.inc(46) : warning 219: local variable "client" shadows a variable at a pr
eceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
elpers.inc(155) : warning 219: local variable "client" shadows a variable at a p
receding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\e
ntity_prop_stocks.inc(574) : warning 219: local variable "client" shadows a vari
able at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\s
dktools_sound.inc(414) : warning 219: local variable "client" shadows a variable
 at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\s
dktools_sound.inc(641) : warning 219: local variable "client" shadows a variable
 at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\s
dktools_tempents.inc(208) : warning 219: local variable "client" shadows a varia
ble at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(186) : warning 219: local variable "client" shadows a variable at a prec
eding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(194) : warning 219: local variable "client" shadows a variable at a prec
eding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(202) : warning 219: local variable "client" shadows a variable at a prec
eding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(210) : warning 219: local variable "client" shadows a variable at a prec
eding level
// 123.sp(28) : warning 219: local variable "client" shadows a variable at a pre
ceding level
// 123.sp(37) : warning 219: local variable "client" shadows a variable at a pre
ceding level
// 123.sp(74) : warning 219: local variable "client" shadows a variable at a pre
ceding level
// 123.sp(85) : warning 234: symbol "FindDataMapOffs" is marked as deprecated: U
se FindDataMapInfo instead, or HasEntProp if you just want to check for existenc
e.
//
//
// 123.sp(87) : warning 234: symbol "FindDataMapOffs" is marked as deprecated: U
se FindDataMapInfo instead, or HasEntProp if you just want to check for existenc
e.
//
//
// 123.sp(107) : error 122: expected type expression
// 123.sp(107) : error 001: expected token: ";", but found "<="
// 123.sp(109) : error 010: invalid function or declaration
// 123.sp(107) : warning 203: symbol is never used: "client"
//
// 3 Errors.
//
// Compilation Time: 0,12 sec
// ----------------------------------------
BulgarPL is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 12-17-2016 , 10:39   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #8

Quote:
Originally Posted by xines View Post
Quote:
Originally Posted by Peace-Maker View Post
Never pass a client index through an asynchronous callback. Use the userid instead.
Explain to me why wiki tells me something different when using handles:
https://wiki.alliedmods.net/Timers_(...#Simple_Values
If you read the wiki example carefully you shall see it uses.

Code:
public void OnClientPutInServer(int client) public void OnClientDisconnect(int client)

The timer is created under OnClientPutInServer forward, and destroyed under OnClientDisconnect if the client leaves before, using user id inside the timer callback is useless, since the timer is destroyed when the client leaves the server (so the userid becomes invalid).

Then it shows that you can use client serial OR UserID.
And you should notice the timer is no longer destroyed under OnClientDisconnect forward.
Because under the timer callback we look if the client serial OR UserID is still valid (aka the client didn't leave), and display or not the welcome message.
__________________

Last edited by Benoist3012; 12-17-2016 at 10:40.
Benoist3012 is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 12-17-2016 , 10:48   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #9

Quote:
Originally Posted by Benoist3012 View Post
If you read the wiki example carefully you shall see it uses.

Code:
public void OnClientPutInServer(int client) public void OnClientDisconnect(int client)

The timer is created under OnClientPutInServer forward, and destroyed under OnClientDisconnect if the client leaves before, using user id inside the timer callback is useless, since the timer is destroyed when the client leaves the server (so the userid becomes invalid).

Then it shows that you can use client serial OR UserID.
And you should notice the timer is no longer destroyed under OnClientDisconnect forward.
Because under the timer callback we look if the client serial OR UserID is still valid (aka the client didn't leave), and display or not the welcome message.

Ahh, totally missed that part ty, so in that case here:

PHP Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <cmod>

public Plugin myinfo = {
    
name "Cmod Skill: Sanitarne",
    
author "Raflik",
    
description "Skill Sanitarne",
    
version "0.1",
    
url "www"
};

int sanitarneKlasa[MAXPLAYERS+1] = 0;
int sanitarneItem[MAXPLAYERS+1] = 0;
Handle timer_klasa[MAXPLAYERS+1] = null;
Handle timer_item[MAXPLAYERS+1] = null;

//natywy
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
//natywy
    
CreateNative("Sanitarne"native_sanitarne);
    
    return 
APLRes_Success;
}

public 
void OnClientConnected(int client)
{
    
sanitarneKlasa[client] = 0;
    
sanitarneItem[client] = 0;
}

public 
int native_sanitarne(Handle pluginint numParams)
{
    
int client GetNativeCell(1);
    
int klasa GetNativeCell(2);
    
int item GetNativeCell(3);
    
    if(
klasa == -|| item == -1)
    {
        if(
klasa == -1)
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client]);
                
timer_klasa[client] = null;
            }
        }
        if(
item == -1)
        {
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client]);
                
timer_item[client] = null;
            }
        }
        return;
    }
    
    if(
klasa)
    {
        
timer_klasa[client] = CreateTimer(5.0leczGetClientUserId(client), TIMER_REPEAT);
        
sanitarneKlasa[client] = klasa;
    }
    if(
item)
    {
        
timer_item[client] = CreateTimer(5.0leczGetClientUserId(client), TIMER_REPEAT);
        
sanitarneItem[client] = item;
    }
}

public 
Action lecz(Handle timerany userid)
{
    
int client GetClientOfUserId(userid);
    if(
IsValidClient(client) && IsPlayerAlive(client))
    {
        if(
sanitarneKlasa[client] || sanitarneItem[client])
        {
            
int hp GetClientHealth(client) + (sanitarneKlasa[client] + sanitarneItem[client]);
            
int maxHp = (100 Cmod_GetClientCON(client)) + (Cmod_GetClassCON(client) + Cmod_GetBonusCON(client));
            if(
hp maxHp)
                
SetEntityHealth(clientmaxHp);
            else
                
SetEntityHealth(clienthp);
        }
        else
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client]);
                
timer_klasa[client] = null;
            }
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client]);
                
timer_item[client] = null;
            }
        }
    }
    
    return 
Plugin_Continue;
}

stock bool IsValidClient(int client)
{
    return (
<= client <= MaxClients && IsClientInGame(client));

__________________
xines is offline
BulgarPL
Member
Join Date: Dec 2015
Old 12-17-2016 , 10:51   Re: Plugin Invalid client index 0 pls help :(
Reply With Quote #10

Quote:
Originally Posted by xines View Post
Ahh, totally missed that part ty, so in that case here:

PHP Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <cmod>

public Plugin myinfo = {
    
name "Cmod Skill: Sanitarne",
    
author "Raflik",
    
description "Skill Sanitarne",
    
version "0.1",
    
url "www"
};

int sanitarneKlasa[MAXPLAYERS+1] = 0;
int sanitarneItem[MAXPLAYERS+1] = 0;
Handle timer_klasa[MAXPLAYERS+1] = null;
Handle timer_item[MAXPLAYERS+1] = null;

//natywy
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
//natywy
    
CreateNative("Sanitarne"native_sanitarne);
    
    return 
APLRes_Success;
}

public 
void OnClientConnected(int client)
{
    
sanitarneKlasa[client] = 0;
    
sanitarneItem[client] = 0;
}

public 
int native_sanitarne(Handle pluginint numParams)
{
    
int client GetNativeCell(1);
    
int klasa GetNativeCell(2);
    
int item GetNativeCell(3);
    
    if(
klasa == -|| item == -1)
    {
        if(
klasa == -1)
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client]);
                
timer_klasa[client] = null;
            }
        }
        if(
item == -1)
        {
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client]);
                
timer_item[client] = null;
            }
        }
        return;
    }
    
    if(
klasa)
    {
        
timer_klasa[client] = CreateTimer(5.0leczGetClientUserId(client), TIMER_REPEAT);
        
sanitarneKlasa[client] = klasa;
    }
    if(
item)
    {
        
timer_item[client] = CreateTimer(5.0leczGetClientUserId(client), TIMER_REPEAT);
        
sanitarneItem[client] = item;
    }
}

public 
Action lecz(Handle timerany userid)
{
    
int client GetClientOfUserId(userid);
    if(
IsValidClient(client) && IsPlayerAlive(client))
    {
        if(
sanitarneKlasa[client] || sanitarneItem[client])
        {
            
int hp GetClientHealth(client) + (sanitarneKlasa[client] + sanitarneItem[client]);
            
int maxHp = (100 Cmod_GetClientCON(client)) + (Cmod_GetClassCON(client) + Cmod_GetBonusCON(client));
            if(
hp maxHp)
                
SetEntityHealth(clientmaxHp);
            else
                
SetEntityHealth(clienthp);
        }
        else
        {
            if(
timer_klasa[client] != null)
            {
                
CloseHandle(timer_klasa[client]);
                
timer_klasa[client] = null;
            }
            if(
timer_item[client] != null)
            {
                
CloseHandle(timer_item[client]);
                
timer_item[client] = null;
            }
        }
    }
    
    return 
Plugin_Continue;
}

stock bool IsValidClient(int client)
{
    return (
<= client <= MaxClients && IsClientInGame(client));

Code:
//// 123.sp
//
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
lients.inc(373) : warning 219: local variable "client" shadows a variable at a p
receding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\u
sermessages.inc(250) : warning 219: local variable "client" shadows a variable a
t a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
alflife.inc(604) : warning 219: local variable "client" shadows a variable at a
preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
alflife.inc(625) : warning 219: local variable "client" shadows a variable at a
preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
ommandfilters.inc(96) : warning 219: local variable "client" shadows a variable
at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
elpers.inc(46) : warning 219: local variable "client" shadows a variable at a pr
eceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\h
elpers.inc(155) : warning 219: local variable "client" shadows a variable at a p
receding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\e
ntity_prop_stocks.inc(574) : warning 219: local variable "client" shadows a vari
able at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\s
dktools_sound.inc(414) : warning 219: local variable "client" shadows a variable
 at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\s
dktools_sound.inc(641) : warning 219: local variable "client" shadows a variable
 at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\s
dktools_tempents.inc(208) : warning 219: local variable "client" shadows a varia
ble at a preceding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(186) : warning 219: local variable "client" shadows a variable at a prec
eding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(194) : warning 219: local variable "client" shadows a variable at a prec
eding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(202) : warning 219: local variable "client" shadows a variable at a prec
eding level
// F:\îmieci z Pulpitu\Sourcemod Sprawy\Najnowszy Kompilator\scripting\include\c
mod.inc(210) : warning 219: local variable "client" shadows a variable at a prec
eding level
// 123.sp(28) : warning 219: local variable "client" shadows a variable at a pre
ceding level
// 123.sp(36) : warning 219: local variable "client" shadows a variable at a pre
ceding level
// 123.sp(75) : warning 219: local variable "client" shadows a variable at a pre
ceding level
// 123.sp(105) : error 122: expected type expression
// 123.sp(105) : error 001: expected token: ";", but found "<="
// 123.sp(107) : error 010: invalid function or declaration
// 123.sp(105) : warning 203: symbol is never used: "client"
//
// 3 Errors.
//
// Compilation Time: 0,73 sec
// ----------------------------------------
BulgarPL is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode