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

CommandExists crashing server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 03-25-2018 , 04:17   CommandExists crashing server
Reply With Quote #1

Hi, why if use fuction CommandExists so my server random crashing.

PHP Code:
        if(StrContains(text"/") == || StrContains(text"!") == 0)
        {
            
ReplaceString(textsizeof(text), "/""sm_");
            
ReplaceString(textsizeof(text), "!""sm_");
            if(!
CommandExists(text)) CPrintToChat(client"%t""command not exists");
            return 
Plugin_Handled;
        } 
Here is reports:
https://crash.limetech.org/lqkd2x4hzm6t
https://crash.limetech.org/ugia6ukczo73
https://crash.limetech.org/s6urdm34d7za
__________________

Last edited by _GamerX; 03-25-2018 at 04:18.
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 03-25-2018 , 10:15   Re: CommandExists crashing server
Reply With Quote #2

What are u trying to achieve?
__________________
PinHeaDi is offline
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 03-25-2018 , 11:28   Re: CommandExists crashing server
Reply With Quote #3

Quote:
Originally Posted by PinHeaDi View Post
What are u trying to achieve?
If you do not understand it, do not replying it
__________________
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 03-25-2018 , 14:38   Re: CommandExists crashing server
Reply With Quote #4

Is "text" a variable you made inside your listener, or do you pull that from the arguments?
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS
OSWO is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 03-25-2018 , 18:10   Re: CommandExists crashing server
Reply With Quote #5

Quote:
Originally Posted by _GamerX View Post
If you do not understand it, do not replying it
Instead of being perpetually rude, could you atleast provide a minimalistic STR?
KyleS is offline
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 03-26-2018 , 06:33   Re: CommandExists crashing server
Reply With Quote #6

Quote:
Originally Posted by OSWO View Post
Is "text" a variable you made inside your listener, or do you pull that from the arguments?
from the arguments

PHP Code:
public Action Command_Chat(int client, const char[] commandint args)
{
    if(
IsValidClient(client))
    {
        
char text[512], textcolor[1024];

        
text[0] = '\0';

        
GetCmdArgString(textsizeof(text));
        
StripQuotes(text);
        
TrimString(text);
... 
__________________
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 03-26-2018 , 06:52   Re: CommandExists crashing server
Reply With Quote #7

Does this happen with specific input strings, or just randomly? I use CommandExists in one of my plugins and haven't had these issues before.
hmmmmm is offline
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 03-26-2018 , 07:02   Re: CommandExists crashing server
Reply With Quote #8

Quote:
Originally Posted by hmmmmm View Post
Does this happen with specific input strings, or just randomly? I use CommandExists in one of my plugins and haven't had these issues before.
I did not check if this make specific command. I just remove from plugin on both my server and the crashes ceased. So I just know it's doing this fuction
__________________
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-26-2018 , 15:21   Re: CommandExists crashing server
Reply With Quote #9

Looks like the respective commands were:
  • say "/Ws"
  • say_team "/STATS"
  • say "/Played"

So possibly some issue with input containing capitals?
__________________
asherkin 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 06:43.


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