Raised This Month: $12 Target: $400
 3% 

Timer_UpdateHudHint Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jedyny
Member
Join Date: Aug 2016
Old 08-27-2016 , 11:57   Timer_UpdateHudHint Problem
Reply With Quote #1

Hey, I just downloaded speclist plugin, this one - https://forums.alliedmods.net/showpo...1&postcount=52

Plugin works fine, but it's giving me these errors:

Code:
L 08/27/2016 - 08:40:49: [SM] Call stack trace:
L 08/27/2016 - 08:40:49: [SM]   [0] Format
L 08/27/2016 - 08:40:49: [SM]   [1] Line 164, /groups/sourcemod/upload_tmp/textF103Ip.sp::Timer_UpdateHudHint()
L 08/27/2016 - 08:40:49: [SM] Exception reported: Client index 140 is invalid
L 08/27/2016 - 08:40:49: [SM] Blaming: speclist.smx()
Does anyone know how I can fix this?

Plugin code:

Spoiler

Last edited by jedyny; 08-27-2016 at 11:59.
jedyny is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 08-27-2016 , 12:02   Re: Timer_UpdateHudHint Problem
Reply With Quote #2

Its not checking if the index is valid, meaning if it's associated with an actual in-game player.

Try use this:
PHP Code:
/**
 * Check if a client index is a player.
 *
 * @param num1  Client index.
 * @return        True if index is player, false if not.
 */
stock bool IsValidClient(int client)
{
    return (
client >= && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && !IsClientSourceTV(client));


Last edited by Michael Shoe Maker; 08-27-2016 at 12:03.
Michael Shoe Maker is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 08-27-2016 , 12:09   Re: Timer_UpdateHudHint Problem
Reply With Quote #3

You can give this a try, as per Michael Shoe Maker's suggestion.
Also did some syntax updating.
Attached Files
File Type: sp Get Plugin or Get Source (speclist.sp - 346 views - 6.1 KB)
Maxximou5 is offline
Reply


Thread Tools
Display Modes

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 16:13.


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