Raised This Month: $ Target: $400
 0% 

Invalid player id 0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-20-2014 , 12:55   Re: Invalid player id 0
Reply With Quote #1

Quote:
Originally Posted by RateX View Post
@Bugsy: I was just talking about Hamlet's method of checking. Since the author's already check !is_user_connected, a connected player won't be out of 1 to maxplayers range.



Yep, that's what I was referring to.
Anyway, welcome back!
Thanks!

His ultimate issue is using AND's instead of OR's in his statement, is_user_connected is also a redundancy.

His if-statement could return true if a player tossed a grenade to hurt himself then immediately disconnected.
PHP Code:
if(!is_user_connected(idattacker) && !is_user_alive(idattacker) && this == idattacker)
IF ( ( 
ATTACKER NOT CONNECTED ) AND ( ATTACKER NOT ALIVE ) AND ( VICTIM=ATTACKER ) ) 
__________________
Bugsy 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 15:18.


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