Raised This Month: $32 Target: $400
 8% 

Error: Client Not In Game


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 02-12-2009 , 19:57   Error: Client Not In Game
Reply With Quote #1

I dont script but I need some help getting this error patched up. I think it just needs a check for isclientfake and ingame or something. Here is the code, the error is on line 4.

http://pastebin.com/d14ae50d2

http://pastebin.com/d417238b3
__________________

DontWannaName is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 02-12-2009 , 19:59   Re: Error: Client Not In Game
Reply With Quote #2

in whatever function calls NotifyPlayerDeath, do a if(IsClientInGame(client)) check on client before calling that function.
__________________
CrimsonGT is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 02-12-2009 , 20:03   Re: Error: Client Not In Game
Reply With Quote #3

Where would I add it? http://pastebin.com/d42ee1d0d
__________________

DontWannaName is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-13-2009 , 02:50   Re: Error: Client Not In Game
Reply With Quote #4

http://bl4nk.ampaste.net/m6e25352c
bl4nk is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 02-13-2009 , 04:23   Re: Error: Client Not In Game
Reply With Quote #5

Is this the only thing you changed because the 2 posts are snippets of the same code. Would I leave return plugin_continue after creating the timer or just add the one to the timer event.
You added this:

Code:
  1. {
  2. CreateTimer(0.5, NotifyPlayerDeath, GetEventInt(event, "userid"));
  3. }
  4. public Action:NotifyPlayerDeath(Handle:timer, any:userid)
  5. {
  6. new client = GetClientOfUserId(userid);
  7. if (!client || !IsClientInGame(client))
  8. {
  9. return Plugin_Continue;
  10. }
__________________


Last edited by DontWannaName; 02-13-2009 at 04:26.
DontWannaName is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-13-2009 , 16:58   Re: Error: Client Not In Game
Reply With Quote #6

I changed also added
Code:
    if (!client || !IsClientInGame(client))
    {
        return Plugin_Continue;
    }
To the timer callback.
bl4nk is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 02-14-2009 , 01:17   Re: Error: Client Not In Game
Reply With Quote #7

Thanks, I got it. No errors yet I also added #pragma 1 which gave me places to add a ; since the original code was missing this.
__________________

DontWannaName is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 02-15-2009 , 03:34   Re: Error: Client Not In Game
Reply With Quote #8

I was getting this error: http://pastebin.com/d48c70eee

Would this be the correct fix based on the code you gave me: http://bl4nk.ampaste.net/d268ff40d
__________________

DontWannaName is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-15-2009 , 03:36   Re: Error: Client Not In Game
Reply With Quote #9

Assuming you pass the userid of the cilent through the timer data.
bl4nk is offline
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 02-15-2009 , 03:40   Re: Error: Client Not In Game
Reply With Quote #10

This is where its called in the code: http://bl4nk.ampaste.net/d6ec5bc7a

The notify donator function is above the code that we fixed.

I hope thats what you mean cause im a C at coding
__________________

DontWannaName 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 20:18.


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