Raised This Month: $ Target: $400
 0% 

can i ignore these error?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 07-25-2014 , 14:27   can i ignore these error?
Reply With Quote #1

Native "IsPlayerAlive" reported: Client [number] is not in game
Native "ZR_IsClientZombie" reported: Client [number] must be alive.
Native "ZR_IsClientHuman" reported: Client [number] must be alive.
Native "GetClientAuthString" reported: Client [number] is not connected
Native "IsFakeClient" reported: Client [number] is not connected
Plugin encountered error 15: Array index is out of bounds

Its in the log

Last edited by lingzhidiyu; 07-25-2014 at 14:28.
lingzhidiyu is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 07-25-2014 , 14:54   Re: can i ignore these error?
Reply With Quote #2

nope
KissLick is offline
rswallen
SourceMod Donor
Join Date: Jun 2013
Location: 127.0.0.1
Old 07-25-2014 , 15:04   Re: can i ignore these error?
Reply With Quote #3

"Client [number] is not in game" - Check if client is ingame with IsClientInGame(client)

"Client [number] must be alive" - Check if client is alive with IsPlayerAlive(client)

"Client [number] is not connected" - Check if client is connected with IsClientConnected(client)

"Array index is out of bounds" - Check if array index is greater than or equal to 0 AND less than array length
Code:
((index >= 0) && (index < arraySize))
__________________

Last edited by rswallen; 07-25-2014 at 15:05. Reason: Added example
rswallen is offline
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 07-26-2014 , 09:46   Re: can i ignore these error?
Reply With Quote #4

PHP Code:
            if (IsFakeClient(i))
            {
                
ChangeClientTeam(i1);
            } 
change it to..
PHP Code:
            if (IsFakeClient(i) && !IsClientConnected(i))
            {
                
ChangeClientTeam(i1);
            } 
I think it is checking if player is a bot change his team,right?
it calls on round start.
lingzhidiyu is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-26-2014 , 10:20   Re: can i ignore these error?
Reply With Quote #5

Quote:
Originally Posted by lingzhidiyu View Post
PHP Code:
            if (IsFakeClient(i))
            {
                
ChangeClientTeam(i1);
            } 
change it to..
PHP Code:
            if (IsFakeClient(i) && !IsClientConnected(i))
            {
                
ChangeClientTeam(i1);
            } 
I think it is checking if player is a bot change his team,right?
it calls on round start.
Actually, it's more like
PHP Code:
            if (IsClientConnected(i) && IsFakeClient(i))
            {
                
ChangeClientTeam(i1);
            } 
The reason for this order is because if IsClientConnected returns false, it never calls IsFakeClient (which would error). This is because && and || are short-circuited in Pawn.

Incidentally, IsClientInGame can be used in most spots that IsClientConnected is as a player has to be in game to do most actions. IsClientInGame doesn't require an explicit IsClientConnected call first.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Reply



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 05:31.


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