Invalid player id 0
Error:
Code:
L 12/20/2014 - 17:10:34: Invalid player id 0PHP Code:
|
Re: Invalid player id 0
Check to make sure idattacker is actually a player
|
Re: Invalid player id 0
Sorry, but I didn't understood what should I do.
|
Re: Invalid player id 0
Check if 1 <= idattacker <= maxplayers
|
Re: Invalid player id 0
Read the first check you wrote, that's where the problem lies.
@HamletEagle: is_user_connected is enough :) |
Re: Invalid player id 0
Quote:
PHP Code:
PHP Code:
|
Re: Invalid player id 0
@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.
Quote:
Anyway, welcome back! :) |
Re: Invalid player id 0
Quote:
PHP Code:
This is the whole code: PHP Code:
|
Re: Invalid player id 0
Quote:
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:
|
Re: Invalid player id 0
@RateX, I just explained what Yami told him, not taking into account his code.
|
| All times are GMT -4. The time now is 15:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.