Invalid player error I need help with.
For a few months now I've been trying to figure out why I get this error.
Code:
[FUN] Invalid player # <--------- each error is different number(player index)Code:
Code:
From all that I have found relating to this error a is_user_connected(id) check was advised. I tried that.. still no luck |
Re: Invalid player error I need help with.
Code:
|
Re: Invalid player error I need help with.
sry teame06 buts its not that hte player isn't on the server but you should look at the line:
set_task(get_cvar_float(CVAR_GOD_TIME), "no_god", id) the third parameter is the id of the task not the parameter that is givent to "no_god" i would change this one into set_task(get_cvar_float(CVAR_GOD_TIME), "no_god",57, id) or another number than 57 if i helped plz submit +karma |
Re: Invalid player error I need help with.
Quote:
Code:
[quote="MadMaurice"] set_task(get_cvar_float(CVAR_GOD_TIME), "no_god",57, id) or another number than 57[quote] Secondly of all you used the 4th parmeter wrong too. The 4th parameter is an array you pass. So you have to do Code:
Also if you you were going to remove the task later. You would do a unique task. |
Re: Invalid player error I need help with.
well at anyrate, adding in the is_connected check within the no_god function seems to have done the trick.
thanks a lot both of you for giving your input. very much appreciated. |
Re: Invalid player error I need help with.
@teame
thats right they could disconnect but this is not what the error is telling about.if you had looked at the errors you would see that theres an error everywhere where the var id is used. he didn't gave it to the nogod function ps.: i made many plugins which worked with given the id to the parm array |
Re: Invalid player error I need help with.
@ MadMaurice
The problem is that his set_task is still correct usage. Nothing wrong with the var id he used. Everything in his set_task is still correct usage. Code:
#define CHECK_PLAYER(x) \This is the last time i'm saying it. Nothing is wrong with this set_task |
Re: Invalid player error I need help with.
MadMaurice: You are incorrect.
Raa is passing the player's id in as the task id. There's nothing wrong with that and it's a shortcut that many people use when appropriate. |
Re: Invalid player error I need help with.
Quote:
MADMAURICE GOT OWNED IN THE GRILL |
| All times are GMT -4. The time now is 06:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.